Page breaks disappear

I have a document in odt, which contains numerous paragraph and character styles. I only have one page style, this the default page style.

If I add a page break somewhere in the document it sticks. If I select the entire document and then “clear direct formatting” the page breaks remain. But when I close and open the document again the page breaks are missing.

Is this the expected behavior. Is there a way I can keep the page breaks.

There is bugs reports on this issue: tdf#73483, tdf#126546, tdf#138628.

Applying a paragraph style (not the Default as in the following screenshot) that got page break.

Thanks for the help here and bringing my attention to the known bugs as well as possible solutions.

It doesn’t look like there is an option to apply a paragraph style to a page break although I can apply to a page break a text flow that has a page break occurring before. Although like before this type of page break indeed does disappear when I clear direct formatting and then close and open the document.

If you meant that I can apply a paragraph style that contains a page break in the text flow tab, to text occurring just after where I want the break, that does work. But it doesn’t help my situation as I don’t want a page break before every occurrence of certain paragraph styles. I guess I could create additional paragraph styles to get around this but this seems like extra work to have to do this every time I want a page break that will hold if I clear direct formatting and open and close a document. Additionally, I use some of these paragraph styles in my table of contents, so I would also need to add these additional paragraphs styles there. Not the end of the world just more work.

Hopefully the bug can get worked out at some point.

Paragraph styles describe the role and importance of the paragraph within your text. Only then you assign typographical attributes to the style. This is called semantic markup. Consequently, trying to design a one-size-fits-all paragraph style is an error.

In your case, if some of your patagraphs must be preceded by a page break, they have a role different from Text Body and deserve a style of their own.

You can break this rule if you consider the page break as a very exceptional occurrence. It is then allowed/tolerated to add the break as direct formatting. But remember that your text contains DF when you tune your formatting so that you don’t get surprised by non-application of some modifications to your styles.

This is again an error. TOC is not part of the narrative and should be styled specifically. Built-in styles for the TOC are Contents 1-10. In addition, you usually don’t need to build manually your TOC. Style your headings with Heading 1-10 and your TOC can be automatically built. And in the capture process, heading spacing, including page break, is removed to keep only what is defined in Content 1-10.

Thanks ajlittoz for your thoughts here. It sounds like you think that the situation I originally described is expected behavior. It is good to know there is differing opinions regarding this.

From a formatting standpoint, my document is quite varied and I have more than 40 different paragraphs styles being applied, so I am not using a one sized-fits all paragraph style. The page breaks are rare exceptions. Currently I have just five. Perhaps I will do as you say and add a few more paragraph styles to deal with these situations.

I still don’t understand why these are considered direct formatting in that they are not really part of any paragraph. In fact they come between two different paragraphs, which in my case both have different paragraph styles.

In terms of other direct formatting. I don’t use any. I have intentionally avoided using direct formatting so as you note, I don’t have any surprises arise. The only surprise I have had arise is the one related to the page breaks, which I didn’t realize are direct formatting.

When I said I use some of these paragraph styles in my table of contents, I didn’t mean that I use them to style the table of contents but instead use them to define the content.

Everything outside styles is direct formatting. But as usual, rules are made to have exceptions (if they are really exceptions). 5 page breaks in a whole 100+ page document is a case where it is acceptable to add them manually. Provided, of course, they are not always associated with a unique paragraph style.

Don’t use too many paragraph styles because you’ll end up being confused. If you adopt *semantic styling" approach where styles describe the importance of some sequence from the author’s point of view, you need at most ~25 paragraph styles, including those for headings and TOC, because it is highly unlikely that you have that many different concepts/ideas in a text. Add ~10 character styles for very sophisticated texts. Number of page styles is related to the structure (outline) of the document and can’t be generally predicted because it depends on choice of features (e.g. a chapter may be formatted either with on style configured for variants or with 3 page styles).

I’d say that 40 para styles is excessive and you didn’t introspect deeply on your text. You probably designed the styles with their visual effect in mind instead of significance. Visual effects should be attached to styles in the last steps of document “polishing”.

That said, the only way to find the cause of page break “evaporation” is to have a look at some short sample file. Attach one and comment upon what to look for.

Thanks for this advice. I understand what you are saying. Part of the reason I have so many paragraph styles is I am using some of them to help format indented dichotomous keys. 20 paragraph styles for that purpose. If there is a better way to create these, I would be open to hearing about it (getting a bit off tangent here :grinning: )

Explain what you’re trying to do with an example. If I guess right, you can make do with a single style configured for multi-level list. But this is guess work and an explicit description is preferable.

I created a new Paragraph Style (named it Hidden), created an empty paragraph before the page break, and applied.

Cool LeroyG. That is exactly the work around I am looking for. I was actually just thinking the same thing too although I was going to name the style, “page break”.

The other solution is for LibreOffice to allow one to apply a page style to a page break. But perhaps I am oversimplifying things.

Thanks again both of you for all the help.

1 Like