Bug Hunting Session
Bug 103816 - Both margins in Frame > Formula style need to be zero.
Summary: Both margins in Frame > Formula style need to be zero.
Status: RESOLVED DUPLICATE of bug 65067
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 103865 111766 (view as bug list)
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2016-11-09 19:41 UTC by mr.Pablo
Modified: 2018-01-09 11:05 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Exaggerated spacing in inline equations (21.33 KB, application/vnd.oasis.opendocument.text)
2016-11-09 19:41 UTC, mr.Pablo
Details
space differences (2.05 KB, image/png)
2016-11-11 17:28 UTC, Ben
Details
example with Wrap and Borders (11.16 KB, image/png)
2016-11-11 17:41 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mr.Pablo 2016-11-09 19:41:39 UTC
Created attachment 128626 [details]
Exaggerated spacing in inline equations

LO Writer has a problem when wtiting inline equations: There is a big spacing before and after the equaion that makes it impossible to use inline equations separated by commas. 

The solution is to set the default value of the left and right Object->Wrap->Spacing to zero. This will make possible using inline equations separated by commas or even in a sentence finishing with a fullstop (see attachment).
Comment 1 Xisco Faulí 2016-11-09 20:18:17 UTC
COnfirmed in

Version: 5.3.0.0.alpha1+
Build ID: 8a2a3f1032b4e60f7607e3ecb1ff99a6bb9af7f9
CPU Threads: 4; OS Version: Linux 4.2; UI Render: GL; VCL: gtk2; Layout Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 V Stuart Foote 2016-11-09 21:55:23 UTC
No, the current default spacing is reasonable for general input of formulas. 

In line on a common base with a string of text is a special case that is simply handled per formula object with the Wrap value as in comment 0 (or/and possibly setting the formula's internal spacing with edit Format -> Spacing -> Category:Borders)

Setting different defaults is done by modifying the Frame style -> Formula where tighter left/right wrap can be set. 

And within the Math editor the Format -> Spacing -> Category:Borders can be set to take a new default to produce more appealing in line spacing. The two becomes a per-user default for new formulas.

Imagine it would be possible to develop a new Frame style -> FormulaInline style to simplify what is currently a per-user customization.

=-ref-=
http://unix.stackexchange.com/questions/21906/reduce-the-space-around-in-line-formulas-in-libreoffice
https://wiki.openoffice.org/wiki/Documentation/FAQ/Formula/How_do_I_change_the_spacing_around_my_formula%3F
Comment 3 V Stuart Foote 2016-11-11 16:24:26 UTC
*** Bug 103865 has been marked as a duplicate of this bug. ***
Comment 4 V Stuart Foote 2016-11-11 16:31:30 UTC
@Regina, thoughts on what would be a good way to compose a new Frame -> Formula style for equations in line with text--mix of Wrap and Spacing:Borders? 

Would we need two? FormulaInline, and FormulaInlinePunct for positioning at end of sentence?
Comment 5 Ben 2016-11-11 17:27:16 UTC
After the procedure 'right Object->Wrap->Spacing to zero' under comment0 was used for delta t sub 0 in the attached screenshot, it still looks different in terms of spacing compared the spacing in the next regular text c=2, and h=3,
Comment 6 Ben 2016-11-11 17:28:02 UTC
Created attachment 128669 [details]
space differences
Comment 7 V Stuart Foote 2016-11-11 17:41:01 UTC
Created attachment 128672 [details]
example with Wrap and Borders

In this clip of inline OLE formula objects. The right side Wrap for the Frame -> Formula style has been reduced to 0, and each formulas Spacing -> Borders right value reduced to 0.50 mm.

Trivial to set, but would be better it we can capture a better default to apply with a Frame style for the inline formulas. It would be more consistent and only require assignment of the style rather than directly formatting each formula object.
Comment 8 V Stuart Foote 2016-11-11 17:48:18 UTC
(In reply to Ben from comment #6)
> Created attachment 128669 [details]
> space differences

If you want the glyphs for the operators to match, you'll need to set the text font to match the formula font, or vice versa.  Formula editor will use glyphs from OpenSymbol and a few from Libreation Serif by default.
Comment 9 Regina Henschel 2016-11-11 18:00:22 UTC
The current outer margin given by the wrap property of the formula frame style is _always_ wrong. It should always be 0, not only for inline formulas. The defaults have to be changed. I work around the problem by using my own document template as default. I think, the reporter is right.

There is no need for a special frame style for equations followed by a full stop.
Comment 10 Regina Henschel 2016-11-11 18:37:27 UTC
(In reply to V Stuart Foote from comment #7)
> In this clip of inline OLE formula objects. The right side Wrap for the
> Frame -> Formula style has been reduced to 0, and each formulas Spacing ->
> Borders right value reduced to 0.50 mm.

Both margins in Frame > Formula style need to be zero.

For the OLE formula itself, I would not change the setting in Format -> Spacing -> borders with this issue, because that is a different problem. Currently these settings go to settings.xml, although MathML is the normative part of the equation. Before changing something there, you have to investigate, what defaults for these spacing in MathML other application e.g. browsers use.
Comment 11 V Stuart Foote 2016-11-11 20:00:12 UTC
The left right spacing for the "Formula" frame type is set to 114 twips. It would be simple to change that to 0.  Great for an inline formula. But what of when a complex multi-line formula is inserted it has to use the same spacing.

Formulas can of course be styled the generic OLE frame, but that anchors and aligns differently.

Why not additional frame style formats? 

=-ref-=
http://opengrok.libreoffice.org/xref/core/sw/inc/poolfmt.hxx#158
http://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentStylePoolManager.cxx#1311
Comment 12 Regina Henschel 2016-11-12 00:13:16 UTC
(In reply to V Stuart Foote from comment #11)
> The left right spacing for the "Formula" frame type is set to 114 twips. It
> would be simple to change that to 0.  Great for an inline formula. But what
> of when a complex multi-line formula is inserted it has to use the same
> spacing.

The default, when inserting an equation, is a Math-OLE anchored "as character" with assigned frame style "Formula". So an equation is initially always "inline" and you need to take additional steps to make it floating.

A margin of 0 is correct too, in case you put the equation as first and only item in a line. I do not see why complex multi-line formulas would need a horizontal margin.
 
> Why not additional frame style formats?

This issue is about the default style. Additional frame styles would not solve this problem.
Comment 13 Alex Thurgood 2017-08-17 13:07:07 UTC
*** Bug 111766 has been marked as a duplicate of this bug. ***
Comment 14 Regina Henschel 2017-12-22 21:54:00 UTC

*** This bug has been marked as a duplicate of bug 65067 ***
Comment 15 Xisco Faulí 2018-01-09 11:05:25 UTC
*** Bug 111766 has been marked as a duplicate of this bug. ***