Ask Your Question

Maintaing line height in Writer constant regardless of formulas.

asked 2020-05-22 19:42:01 +0200

Airsalva gravatar image

updated 2020-05-22 20:30:24 +0200

Whenever I insert a formula inside a paragrapho it messes the uniformity of line width. How can i tweak it so that it stays constant?image description

EDIT: i add a picture where the second paragraph seems to have extra neight between the 3 and 4th lines. EDIT: true... height i meant... sorry about that.

(Title edited by ajlittoz)

edit retag flag offensive close merge delete


Edit your question to describe the "technical" characteristics of the insertion. Don't use an answer which is reserved for solutions.

A Math formula is an object which must be anchored somewhere in the text. If you use Insert>Object>Formula, it is generally inserted As Character. This can be checked with a right-click on the formula and Anchor. In this anchoring mode, it is considered a single wide character and participate in text lay out. This does not change line paragraph line area.

If you can't sort out the problem, edit your question to attach a sample file to it (cannot be done to a comment) and explain clearly in this file what you want to achieve.

ajlittoz gravatar imageajlittoz ( 2020-05-22 19:50:13 +0200 )edit

This is not width but height or spacing!

ajlittoz gravatar imageajlittoz ( 2020-05-22 20:12:24 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2020-05-22 20:20:52 +0200

ajlittoz gravatar image

updated 2020-05-22 20:23:15 +0200

Formulas are inserted as "characters". This strange character is enclosed in a box called a frame. A frame generally has padding space around it so that it is positioned clear of the surrounding text.

In the case of inline formulas, this is not desirable, otherwise line spacing increases.

There are two ways to fix it:

  • with frame styles (will apply to all formulas)

    Formulas are enclosed in frames controlled by frame style Formula.

    Open the side style pane with F11 if not already visible.

    Click on the third icon from left in the toolbar.

    Right-click on Formula and Modify.

  • with manual editing on each formula

    Right-click on the formula and Properties.

The rest of the procedure is common to both methods. Go to the Wrap tab and change the Spacing distances. What you want is probably to set Top and Bottom to 0. But experiment to obtain the best looking result.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

edit flag offensive delete link more


Many thanx, i already had those values at 0. With fixed line space seems to look better now.

Airsalva gravatar imageAirsalva ( 2020-05-22 20:40:32 +0200 )edit

Then maybe you composed your formula in size 12 pt while your text is 10 pt. Or also the font face in the formula has not the same base metrics as the text font, e.g.larger x-height or global line spacing. It is very difficult to mix different font families in the same line. Sometimes, even the italic variant of the font causes line spacing irregularities.

ajlittoz gravatar imageajlittoz ( 2020-05-22 20:52:08 +0200 )edit

Gonna look into that, as a matter of fact that was another question I had (how to change the math font), but on that one i did find help online.

Airsalva gravatar imageAirsalva ( 2020-05-22 20:58:52 +0200 )edit

answered 2020-05-22 20:12:33 +0200

LeroyG gravatar image


Choose menu Format - Paragraph - Indents & Spacing tab. Below Line spacing select Fixed "of" and enter the value to use for the line spacing.

LibreOffice Help on Indents and Spacing is loosing some text, but con help.

edit flag offensive delete link more


@LeroyG: I would not recommend this method because you act upon the paragraph while the culprit is the formula. Forcing the line spacing may be forgotten later. Imagine you remove the formula and change the font face and font size. Your line spacing remains the same and you'll wonder quite a long time to understand what's happening.

ajlittoz gravatar imageajlittoz ( 2020-05-22 20:27:01 +0200 )edit

Seems to work. Aji: noted the point (and sorry for confusing width with heght)

Airsalva gravatar imageAirsalva ( 2020-05-22 20:37:06 +0200 )edit

@ajlittoz if your formula is nroot{5}{2^3} it will take more vertical space than a normal line space for almost any font and font size you choose. A fixed line spacing is the only way to "solve" this problem (page register may give you even worst results, with text jumping a whole line), but you need to be careful your formula does not "collide" with the previous or following line(s). Most fonts use a default line spacing in the order of a 120% of the point size, but if you want to use lots of inline objects, you'll need to pick a bigger line spacing... which it's also a bit awkward. I prefer a variable line spacing ;)

RGB-es gravatar imageRGB-es ( 2020-05-22 21:34:08 +0200 )edit

@RGB-es: Inserting inline math formulas leads to the kind of problems you mention. The example you give is typical. Formulas can't be guaranteed to stay within the surrounding line spacing. This is why I prefer to leave the line spacing self-adapting yo prevent collision. The alternate solution, if there are not too many formulas (otherwise the document also looks awkward) it to lay out the formula in its own paragraph. This is easy: just change the anchor to To Paragraph and position it, e.g. horizontally centrered, vertically below the announcing paragraph, tuning wrap so that nothing is flown next to it.

Anyway math text is always breaking nice formatting.

ajlittoz gravatar imageajlittoz ( 2020-05-23 07:56:29 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-05-22 19:42:01 +0200

Seen: 33 times

Last updated: May 22