First page style follows custom page style, when it should be default

I have a custom style, No Header. When I apply it to a page, the page after No Header isn’t the usual default style as it should be. The header reads:

First Page Header (Default Page Style)

It seems to be the default style, but with unique header/footer. The fields are the problem; I could add the chapter field back to the header, but since I have separate even and odd headers, it doesn’t always end up on the right page. I want the page following No Header to be the same default page as any other.

The default page is set as the next style to the No Header. This is really confusing as I can’t find a way to fix this. The format is .odt.

The File
Version: 7.3.7.2 / LibreOffice Community
OS: Linux 5.15

This is similar, but I don’t have any breaks set in my paragraph styles.

I don’t understand the question. Your Default Page Style is configured for different left and right headers (and same footer). It works as expected. Your sequence is No Header, Default Page Style, Default Page Style, … The exact subvariant of Default Page Style depends on page parity but is guaranteed to be correct (odd page n right side, even page on left side).

There is nothing faulty in the page sequence.

However, you will encounter problems when inserting chapter number/title in your headers because the first paragraph of your chapters in not an expected heading style. Your Chapter Number paragraph style is not part of the outline hierarchy (see Tools>Chapter Numbering) which defers chapter change detection by one page. This in itself is of little importance in your case because you don’t need heading.information until next page. But you won’t have the chapter number available anyway because it is not generated by Writer.

The cause is your separation of chapter number from chapter heading. The number should be in the Header 2 paragraph. Set it by customising Tools>Chapter Numbering.

Presently you messed everything up by tweaking Tools>Chapter Numbering in an inconsistent way.

  • You use Heading 1 for “parts”; then this is outline level 1 and should remain so.
    If you consider for other reasons that “parts” should not appear in the TOC because they are outside the outline, then use another paragraph style. This will keep the outline hierarchy clean. Personally, I consider “parts” heading as belonging in this hierarchy (and this allows autonumbering). This is important to auto-restart chapter number when entering a new part.
  • Your Heading 2 should remain at level 2.
  • You created a separate Chapter Number paragraph style but you didn’t attach it to an outline level.
    Of course, you can’t have two paragraph styles at the same level. But the number can be enclosed by separators (respectively “-- " and " --” in Numbering tab) and followed by a newline (Position tab). Thus you have a single paragraph for the number and the title. Distance between the number and the title can be tuned by changing line spacing in Heading 2.
    This solves the problem of correctly capturing the heading since Heading 2 is now the first paragraph in the page.
  • Don’t page break with a manual formatting.
    You can request a systematic page break to No Header in Text Flow tab of Heading 2.

This should solve your incorrectly described problem. You can do the same on Heading 1 to have automatic numbering and possibly page break.


In case I didn’t address the real issue (this is why I used a comment and not an answer), don’t hesitate to provide more information.

Thank you! That fixed many of the issues, but the header still persists. I edited the file to show better.

Currently I have even and odd headers, plus the header that comes after the custom page style. The extra header sometimes ends up on an even or an odd page, so I end up with the wrong field on the wrong page. It doesn’t have the same fields that are on the even or odd headers.

I don’t understand because your specification is not explicit. What do you want? Please describe the header (text+variable information) which should appear on left (even) pages and the one on right (odd) pages. What do you want to add there?

PS: don’t use DropBox. You can attach (upload) a file to your question/comment with the added benefit that the attachment is kept in AskLO database. Consequently, in two years, a visitor can understand the issue while the file in DropBox will have been erased.

I don’t want the extra style, odd pages should have the chapter title and even pages the book title. After the No Header, it should be the either the odd or the even page. Currently it’s not.

I have:
No Header > “First Page” > Default
When it should be:
No Header > Default

libre_first_page_header_2.odt (17.0 KB)

Your page style configuration is as follows:

  • First PageDefault Page Style
  • No HeaderDefault Page Style

For me, the sequence is correct. But looking more carefully, you made an error in the Footer tab of Default Page Style. You didn’t check Same content on first page. This means the first page after a page style transition is “special”. Usually, you use this feature for the first page of a “chapter” (or equivalent subdivision). This eliminates the need for your No Header page style but requires an explicit page break request in Header 2 so that “first page” flag is reset.

I made the change in libre_first_page_header_2.odt (16.7 KB). I let you do the exercise of replacing No Header by the “special” first page in Default Page Style sequence.

I also replaced your manual part numbering by auto-number with Heading 1.


EDIT:
I forgot an important caveat. I noticed you leave a space at the end of every paragraph (right before the paragraph mark). Don’t do that. It is harmless on main topic paragraph but my cause a slight layout error on centered paragraphs, like your headings (because the trailing space is taken into account when computing text distribution); This is visible on your Heading 2 headings where “-- X --” is not exactly centered above the title. The effect is amplified with font size.