I wonder if someone could help shed light on the rationale behind the standard paragraph spacing model in Writer.
In MS Word, Apple’s Pages, and CSS, the margins of consecutive paragraphs collapse, i.e., they are not additive but only the larger of the two counts. For example, if Heading 1 has a “Spacing below” of 24 pt, then it doesn’t matter whether the following element’s “Spacing above” is 12 or 16 points because the value is ignored (since it’s ≤24). I find this model to be practical and intuitive.
In LibreOffice Writer, by contrast, the margins of consecutive paragraphs are additive by default. This complicates styling, as you’re basically forced to use only one of the “Spacing above” or “Spacing below” properties. For example, creating a style for a bulleted list requires at least four distinct styles: (1) the first item, (2) the middle items, (3) the last item, and (4) the sole item in a single-item list. With collapsing margins, all you would need is one style that can apply to all items.
In Writer’s Compatibility Options, there’s a setting labeled “Add spacing between paragraphs and tables”, which is enabled by default. Disabling this setting causes margins to collapse in LO as well.
Inside an ODT file saved by Writer, paragraph spacing is stored in margin-*
properties (which are intended to collapse) instead of padding-*
properties (which are additive). This is regardless of whether the mentioned setting is on or off.
So, the “Add spacing between paragraphs and tables” seems to be just a presentational quirks mode in Writer. It causes the document to be laid out differently than the markup in the file would suggest.
This is baffling to me. Why are additive margins the default, particularly since the presentation is not even reflected in the markup?
In the (very confusing) documentation for the various compatibility options, it says that the setting in question “specifies whether to add Microsoft Word-compatible spacing between paragraphs and tables in LibreOffice Writer text documents”. But when the setting is enabled, the document is precisely incompatible with Word; I get additive spacing in LO and collapsing spacing in Word.
A little Googling tells me that, historically, Word has indeed employed additive spacing, but that hasn’t been the case since Word 2000, where they switched to the HTML/CSS model.
Can it really be the case that LO ships with this inconvenient and incompatible box model enabled by default simply because MS Word used it in the 1990s? Or are there some styling situations that are so difficult to deal with using collapsing margins that the quirks mode is actually considered preferable?