Created attachment 195310 [details] Unselective spacing above suppression Setting "Add paragraph and table spacing at tops of pages" allows to keep _spacing above_ from paragraph style after an "explicit" page break. This is usually used to offset downwards chapter headings (Heading 1). Other headings (1-10) do not require a page break. Therefore when page overflow occurs, text or heading is set at the very top of the page (spacing above ignored). There are however circumstances where a page break is inserted before a heading and spacing above should nevertheless be ignored. Here a use case: Chapter heading starts a new page (_çpage break before_). It is followed by a legend for a picture (frame anchored to the legend paragraph). Since the size of the frontispiece picture is not constant, legend paragraph style requests a page break _AFTER_. Next paragraph is a Heading 2 which starts the second page of the chapter. Here _spacing above_ is kept because the paragraph is preceded by a hard page break. When document is laid out for facing pages, it may happen that page 3 also starts with a Heading 2. But the position of this latter Heading 2 results from normal text flow (eventually after taking into account widow/orphan and keep with next controls) and _spacing above_ is suppressed as expected. This results is a bad visual effect where headings don't align vertically, the one on left page being offset downwards for no obvious reason (to a casual non-technical reader). This can be solved by transferring the "spacing at tops" into the `Indents & Spacing` tab of paragraph styles. To preserve compatibility with existing documents, the value of the check box should be the same as that of Tools>Options, LibreOffice Writer>Compatibility. === "Bibliography" This issue is the subject of bug 146881. I disagree with the suggested workaround in bug 146881 comment 3 because it is not always possible. Also it would break the "smoothness" of the outline, requiring that some *Heading n* to be duplicated for no semantic reason (and this would be akin to some tricky direct formatting if subchapters need to be reordered). Note also that the use case above relies on _page break AFTER_ where you can't specify a new page style. (By the way, why are page breaks before and after handled differently?) === Other consideration(s) The setting also mentions tables. Tables also have spacing setting in their Table tab. Providing the same fix (new "spacing at tops" checkbox) makes the enhancement consistent. === Sample document I tried to reproduce the behaviour but it is highly dependent on font metrics. If Heading 2 "Spacing above suppressed" is not at top of page 3, vary the amount of text in page 2. Sample file is made with Liberation Sans and Serif.
Regina, I feel like this request has to be judged from the ODF angle. An opinion?
ODF has not attribute to specify the behavior. LibreOffice writes it in settings.xml as config-item "AddParaTableSpacingAtStart". Settings from setting.xml need not be understandable for other applications. In XSL-FO the attribute would be space-before.conditionality with value "discard". But ODF has only fo:margin-top, not fo:space-before for paragraphs. I think the current behavior of LibreOffice is a bug. If the setting is such that margin-top is ignored for the first paragraph of a page, then this must happen regardless of the reason for the page break.
... But as this is a compatibility setting, the behavior for the case that spacing has to be added, should follow the way it is done in other applications. I have not tested other applications. Bringing the property "Add paragraph and table spacing at tops of pages" to ODF as regular paragraph attribute, would require a new attribute similar to "conditionality" in XSL-FO. To implement such attribute in LibreOffice (including request to add it to ODF) is a valid enhancement request.
Thank you Regina, let's mark as "new" then.