Don't use HTML paragraph auto spacing?

Is there a setting like MS Word’s “Don’t use HTML paragraph auto spacing”? I want the space between paragraphs A and B to be the larger of A’s “Below paragraph” and B’s “Above paragraph”, not the sum of the two, nor no space at all.

the associated settings in the para-styles of A & B are your friends!

What associated settings, may I ask?

A’s “Below paragraph” and B’s “Above paragraph”,

The styles I was thinking of are Heading 1, Heading 2, Index Heading, and Text Body.


Heading 1
Above paragraph: 1 cm
Below paragraph: 1 cm


Heading 2
Above paragraph: 1 cm
Below paragraph: 1 cm


Index Heading
Above paragraph: 1 cm
Below paragraph: 1 cm

  1. I want the space between Heading 1 and Text Body, Heading 2 and Text Body, Index Heading and Text Body, Text Body and Heading 1, Text Body and Heading 2, and Text Body and Index Heading to be 1 cm.

  2. I want the space between Heading 1 and Heading 2, Heading 1 and Index Heading, and Heading 2 and Index Heading to be 1 cm.

Currently, LibreOffice Writer determines the space between paragraphs as the sum of their Below paragraph and Above paragraph spacing. 1 and 2 cannot both be satisfied.


MS Word’s “Don’t use HTML paragraph auto spacing” setting determines the space between paragraphs as the Max(Below paragraph, Above paragraph), and solves the problem, but this setting does not seem to be present in LibreOffice.

Try setting Above paragraph to zero and set Below paragraph to the spacing you want. See if that achieves your goal.

I had tried that. I want to achieve

* 0.2 cm
[Text]
* 0.2 cm
[Text]
* 1 cm
[Heading]
* 1 cm
[Heading]
* 1 cm
[Text]
* 0.2 cm
[Text]
* 0.2 cm

The system of equations corresponding to your specification has no solution. However, if you accept a little change:
* 1cm
[Heading]
* 1 cm
[Heading]
* 0.2 cm <== this is different
[Text]
the system has a solution (in fact several solutions depending on the value of the “free” variable). You can configure your paragraph styles as:

  • Text Body: above 0.1cm, below 0.1cm
  • Heading: above 0.9cm, below 0.2cm

A more sophisticated scheme is possible if your headings are not all at the same level (usage of Heading n family).

Thanks! That I understand. That is why I asked:

Is there a setting [in LibreOffice Writer] like MS Word’s “Don’t use HTML paragraph auto spacing”?

I suppose the answer is no?

When “Don’t use HTML paragraph auto spacing” is enabled, the space between paragraphs A and B is the larger of A’s “Below paragraph” and B’s “Above paragraph”.
(That is, A’s “Below paragraph” or B’s “Above paragraph”, which ever is larger.)

LibreOffice Writer seems to consider the sum of the two, and when “Do not add space between paragraphs of the same style” is enabled, no space at all (except line spacing).

Yes. Writer paragraphs are kind of boxes laid out below each other. Similarly to HTML, they have margin, border, padding and contents (from outside to inside). These properties have various names in Writer not necessarily matching HTML wording. For instance, margin is spacing vertically and indent horizontally because a “margin” in typography is an unusable area around the sheet.

Positioning the boxes is simple: Writer considers the margin rectangle, except in one case. The boxes are styled the same (same paragraph style) and the style requests Do not add space between paragraphs of the same style in Indents & Spacing where the two boxes are merged with absolutely no space between the merged paragraphs.

1 Like

I think I found the solution:

Tools / Options / Libre office writer / Compatibility / Add spacing between paragraphs and tables

After disabling this setting, Writer seems to determine spacing as line spacing + the larger of A’s “Below paragraph” and B’s “Above paragraph” spacing, equivalent of MS Word’s “Don’t use HTML paragraph auto spacing”.