Currently, there are unnecessary horizontal spacings around formulas. To reproduce, try inserting a simple formula like "B". These spacings make in-line formulas not well integrated and unpleasant to read. They should be removed.
In order for this to be confirmed a clearer description of the problem and example file needs to be provided. "B" is not a formula, it is a variable or symbol or character. Bug #65169 is likely to be a duplicate of this bug, but my comment (#1) there is relevant. Please provide a working example where a multi-character in-line formula cannot be typeset using Unicode text (i.e., requires a Formula frame) AND has uneccessary space within the frame. I am not saying this is not a bug, just that an example would be helpful.
*** Bug 65169 has been marked as a duplicate of this bug. ***
Sometimes it is useful to use the formulas for writing variables because it ensure the same font is used for outline formulas (and you do not need to apply the italic style for the variable). But sometimes it is necessary to use the formula editor, for example if you want to type the int or sum symbols.
Just set in your doc the 'Formula' /frame style/ with 0.0 values for left and right margins. Better, do this in default template.
(In reply to comment #4) > Just set in your doc the 'Formula' /frame style/ with 0.0 values for left > and right margins. Better, do this in default template. If you mean Formula Style -> Wrap -> Spacing, then this is not enough. Still some spacing is left.
In reply to comment #3, I can see you point. I don't think the integral symbol is a great example as there is a Unicode equivalent, however a summation in the form "sum from{i=1} to{100} i." would be difficult to elegantly set using text. Does the problem still occur though once there is this amount of text in the frame? It looks OK here. Seems to only occur with very small frames. I think your comments Ruslan in the duplicate bug #65169 (#c3) about visual Word compatibility are probably a better angle to take. Again though, it would be good to have a Word doc (+screenshot) and equivalent ODT (+screenshot) showing the difference. I admit I probably was not accurate enough in my initial comment here. I'm not against using the equation editor for this type of thing (although it does seem to be an edge case) I was mainly trying to get some better examples and improve the problem description. Anyway I have made my point. Best wishes for getting this fixed.
Created attachment 80936 [details] Test Word document Well. Here's how it looks in Word 2007 [1]. And how it's in LibO 4.0 [2]. [1]: http://i0.simplest-image-hosting.net/picture/word.png [2]: http://i0.simplest-image-hosting.net/picture/libo.png
(In reply to comment #5) > (In reply to comment #4) > > Just set in your doc the 'Formula' /frame style/ with 0.0 values for left > > and right margins. Better, do this in default template. > > If you mean Formula Style -> Wrap -> Spacing, then this is not enough. Still > some spacing is left. There's that (and your proofpics seem to hint at just that solution), and there's Formula Editor->Spacing->Category->Borders->Left/Right -- additional 2 by 1mm. Is it still not enough?
(In reply to comment #8) > there's Formula Editor->Spacing->Category->Borders->Left/Right -- additional > 2 by 1mm. Is it still not enough? This makes things much better. Still, it's not quite enough: 1. This isn't applied automatically to Word documents so they are rendered differently than they are intended to be. 2. This is still not ideal for use independent of M$ Office, see comparison with LᴬTᴇX rendering [1] to see what I'd like to get (some small space still remains). 3. These spaces are really unnecessary for inline formulas, it'd be better if they were omitted by default. (Are they still needed for displayed formulas?) [1]: http://i0.simplest-image-hosting.net/picture/delta.png
Word documents as a class (and I guess you mean import/export of those) are affected by bug 45284. There is, like, one instance of LibO in the world (sitting on my disk; patch attached to the ticket :)) not adding 'size 12' and 'size 8' to everything in Word-imported/exported formulas. Then, LibO Formula Editor (renderer) seems to make too much guessing on what is 'acceptable' w/r to spacings, placings etc. Just off my little list, see bug 65808, bug 65774, bug 65229, bug 65230, bug 62355. Your delta is inserted as %delta, right (so, comes from OpenSymbol)? Might be renderer's guesswork at work, then.
(In reply to comment #10) > Your delta is inserted as %delta, right (so, comes from OpenSymbol)? Might > be renderer's guesswork at work, then. Funnily, it's not. It appears I have a Unicode 𝛿 char in the formula code. And when I change it to %delta, your workaround with second place of spacing settings gives almost perfect results.
(In reply to comment #11) > (In reply to comment #10) > > Your delta is inserted as %delta, right (so, comes from OpenSymbol)? Might > > be renderer's guesswork at work, then. > Funnily, it's not. It appears I have a Unicode 𝛿 char in the formula code. > And when I change it to %delta, your workaround with second place of spacing > settings gives almost perfect results. Well, 'delta' on the left of your proofpic definitely is not out of 'CMU Serif' (that on the right is). Looks 'Times New Roman'-ish. What have you set in the Formula Editor 'Fonts', then?
(In reply to comment #12) > Well, 'delta' on the left of your proofpic definitely is not out of 'CMU > Serif' (that on the right is). Looks 'Times New Roman'-ish. What have you > set in the Formula Editor 'Fonts', then? Couldn't find correct font for delta to look as in LᴬTᴇX case, so left it at Times New Roman. But is it very important which font is in use?
(In reply to comment #13) > (In reply to comment #12) > > Well, 'delta' on the left of your proofpic definitely is not out of 'CMU > > Serif' (that on the right is). Looks 'Times New Roman'-ish. What have you > > set in the Formula Editor 'Fonts', then? > Couldn't find correct font for delta to look as in LᴬTᴇX case, so left it at > Times New Roman. But is it very important which font is in use? Of course it is. TeX primarily uses well-regulated set of fonts (which means such horisontal things approaches, kerning etc.). That's what CMU pack is derived from, anyway. But when you mix two different fonts, created on different assumptions about horizontal layout, you might get not-so-good-looking results. E.g., LibO's OpenSymbol might combine not too well with some font faces etc.
Duplicate to Bug 55469 ?
(In reply to comment #15) > Duplicate to Bug 55469 ? Nope. The complaint here is about horizontal space.
In Bug 66405 (comment No.9), I posted a macro to remove all spacing around all formulas in a document at once. Hope this helps.
There are two places involved. (1) frame style "Formula" > tab "Wrap". Set left and right spacing to zero. (2) In formula edit mode or in a Math document goto Format > Spacing. Select "Borders" from the drop-down list "Category". Set left and right to zero. To make (1) permanent, change it in your default document template. To make (2) permanent, click on button "Default" in the above mentioned dialog. Because the settings exists, one can only make an enhancement request to change the defaults.
*** Bug 96565 has been marked as a duplicate of this bug. ***
Further duplicates had been in bug 73598 and bug 46464, which had been erroneously set to worksforme and invalid.
*** Bug 103816 has been marked as a duplicate of this bug. ***
*** Bug 111766 has been marked as a duplicate of this bug. ***
*** Bug 134908 has been marked as a duplicate of this bug. ***
*** Bug 149052 has been marked as a duplicate of this bug. ***
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/96de6dee60aaf2f0d332291fa3b0ad7bb8b7127c tdf#65067 Remove excessive spacing from Formula objects It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
All seems OK now. Inserting a new formula object will not add horizontal spacing. Tested with: Version: 7.4.0.0.alpha1+ / LibreOffice Community Build ID: b2467d6c7af988f8ed4e090ebf9472be6c84fb06 CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: threaded
Related: https://gerrit.libreoffice.org/c/core/+/154252