Problem with section: No background color at the section's beginning


I’m trying my luck with sections for the first time ever.
They seem really neat and a good tool to style parts of my document. Unfortunately they don’t behave exactly as I wish.
In this case, the background color is everywhere in the section - but not in the first few millimeters.
The first sentence in my section is a heading, but the problem persists even if I delete said heading and start with some standard text (the uncolored background part gets a bit slimmer but is still there).
Could you tell me what I might be overlooking here and how to solve this?

From what I can see by experimenting, there is probably a “glitch” (if it isn’t a bug) in spacing management at the frontier of section.

The gray clue indicating section switch is drawn immediately below the characters of the last paragraph in the previous section (or main area) without consideration for “spacing below” which IMHO is still part of the current section.

The space between the last line in the preceding section and the first line of the new section is made up of the sum of the “space below” for the last paragraph and the “space above” for the first paragraph. This space is erroneously taken as part of the previous section and “backgrounded” as such.

An inconsistency occurs at end of section. The gray clue is drawn immediately below the characters, the same as at start. But now the space (sum of “space below” for last and “space above” for next) is not part of the section we are leaving but considered part of the main page area. See screen shot:

Section background


Backgroundwise, Writer considers the section effectively begins at the top of the bounding box of the characters composing the first paragraph and it ends at the bottom of the bounding box of the characters in the last line.

I don’t know if this is a misconception or an intentional specification.

Personally, I would consider that spacing above and below a paragraph belongs to the paragraph. Since the paragraph is inside a section, the section should include this spacing because a user could intentionally format the section with section-specific styles in order to achieve a desired layout.

If you consider this is a bug, I’ll fill in a bug report on your behalf with the attached sample file corresponding to the secreenshot.

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!


Bug report at tdf#137069

Hi ajlittoz,
thank you very much for your detailed explanation and experimentation!
I do consider this a bug (or glitch, but definitely not expected behavior) and would love to accept your kind offer to file a bug report on my behalf. I’m really grateful for this service, as it is such a pain to file bug reports in communities one usually doesn’t stray into.