Blank Lines at the Top of Pages [automatically remove]

Hi, Is there a way to automatically remove blank lines from the top of a page? When a paragraph is empty and is at the top of a page, the next paragraph is stepped down a line. Can this be automatically suppressed?

Yes, by adopting styles instead of direct formatting.

From your wording, it appears you use Writer like a dumb mechanical typewriter where typist was compelled to create vertical spacing with empty paragraphs.

In a modern document processor, absolutely no empty paragraph should be present. An empty paragraph contains no data; it has void significance and provides no information to the reader.

Think of your text as a sequence of paragraphs, each belonging in a semantic “category” such as main topic, heading, comment, explanation, note, … Each category is formatted specifically (headings can be bold in bigger size), main topic is justified with alinea indenting, comments are italic, notes are smaller size, …

All these characteristics can be stored in a paragraph style (PS). A PS not only describes typographical attributes (in fact it is an implicit character style) but also implements a “box model” for the paragraph. The main attributes for this box model are spacing above, below, left and right. Define your specific spacing above and below in the paragraph style instead of typing an empty paragraph.

Note that this a change of paradigm. Instead of thinking in inter-paragraph spacing, you now deal with an “intrinsic” spacing linked to the paragraph. It requires to distribute your inter-para distance over above and below distances so that you get your intended spacing between paragraphs of different category (the case of same category is easy because it doesn’t matter how you split the distance because you always get the sum of below+above).

Once you have designed your set of paragraph styles (or modified built-in ones – Body Text is the “standard” PS for the main topic), you can decide if you ignore spacing at top of pages or not (it may be useful to keep it for chapter headings). The decision is yours. You set it in Tools>Options (or the Preferences menu under MacOS), LO Writer>Compatibility.

If you never heard of styles, it would be quite long to explain how to proceed. Consequently, I recommend you read the relevant chapters in the Writer Guide. For a deeper analysis of benefits of styles, read Bruce Byfield’s Designing with LO, also available from the same documentation page after pressing More and scrolling down a bit.

PS: when asking here, always mention, OS name, exact LO version (with at least 4 numbers like 25.8.3.2) and save format for best accurate suggestions.

1 Like

@MattC here is a little exercise to see how LibreOffice hhandles properly formatted paragraphs:

  1. Open a new document and type Paragraph, press Ctrl+1 to apply Heading 1 style
  2. Press Enter to start a new line and type lorem. Press F3 to create several paragraphs. Notice that there is a distinct gap between paragraphs and the paragraph style box says Body Text.
  3. Repeat step 2 above until you have at least a couple of paragraphs on the second page.
  4. In the paragraph at the bottom of the first page, delete lines until the entire paragraph is on the first page. Look at the second page, the next paragraph is at the top of the page.

If you think the spacing between paragraphs in the body of the text is not sufficient, then:

  1. Make sure the Sidebar is visible and click on the Styles icon at the side (Alt+2)
  2. Right click on the Body Text entry and click Edit Style
  3. Select the Indents & Spacing tab and increase the Below paragraph field to suit. Note that you can, instead, type in a point size by typing 12 pt OK

Thank you for your comment, and I understand your suggestions regarding paragraph styles. However, my text is formatted to first line indent and no paragraph spacing - as you would get in a normal reading book. When a new section is created, the header cannot be up against the last paragraph; there needs to be a space. The obvious solution is to create a spacing above the paragraph of the header in the heading style. But this causes a space above the header when the header is at the top of a new page. I want the header to be at the top of the page, therefore no spacing should be set to above the header. This leads to the only solution I can work out - to insert an empty para just before the new header. But then this causes a problem when the empty para is at the top of the page. I would then have to manually go through and remove all empty paras that are at the top, which can be a problem, especially if I am continually editing the document. Hope this clears up the misconception.
Also,
OS = Linux Mint 21.3; LO = Version: 7.3.7.2

So there are a couple of ways to do that.

  • The quickest is that suggested by @ajlittoz , click Tools > Options > LibreOffice Writer > Compatibility and untick the second option from the top, Add paragraph and table spacing at the top of first page and page breaks
  • Without changing the compatibility setting.
    • Right click the Body Text paragraph style and select Edit Style. In the Indents & Spacing tab,
    1. Set First line indent to your preferred measurement, e.g. 0.50 cm
    2. Set Below paragraph to a measurement that you want above the Heading, e.g. 0.42 cm.
    3. Tick the box Do not add space between paragraphs of the same style. OK
    • Right click the Heading 1 paragraph style (or your chosen heading style) and select Edit Style. In the Indents & Spacing tab,
    1. Set Above paragraph to 0 cm. OK

NoSpacingAboveHeading.odt (52.4 KB)

1 Like

LO-WRiTER-CALC_transform by calculate line-spacing versus type-size_030812.ods (27.2 KB)
This is helpfully when I need to set and fix the line spacing cause a larger character within it increases the variable line spacing in an undesired way.

Thank you. The second part (Without changing…) does exactly what I want. Much appreciated.

I rely on Writer to do the conversion from pt to mm by just typing the value and the unit into the size box, e.g 12 pt is converted by Writer into 4.2 mm.

Note that your calculation of point is for the American point system for hot metal presses, but is close enough to be used for the Text point, see Point (typography) - Wikipedia. I prefer the simpler DTP definition which Writer uses