Custom headers for different chapters

Hi,
I never managed to get a hang of the various styles in LibreOffice writer, but now I must take the plunge :slight_smile:

What I’d like is to create a variety of styles, so that, for the preface section, I get the word preface in the header and at the left hand side on even numbered pages, and preface + right hand side numbering on odd numbers. I’d also like to do this for the next chapter, entitled Catastrophe, but with the word “preface” replaced by Catastrophe. None of the examples I’ve seen on-line tell me how to do this. Can anyone help?

You’ll have to dive into the delights of Page style because header/footer is a property of page styles.

Open the style panel with F11 and click on the page icon (fourth from left).

To preserve the possibility to have un-headed chapters, create a new style: right-click on Default Style and choose New …. Give it name Chapter (or any other to your liking).

Tune the general lay-out in Page tab.

Got to Header tab. Check Header on, uncheck Same content left/ight.

Click OK to record your page style definition.

Modify your Heading 1 paragraph style definition (I suppose all your chapters begin with such a paragraph containing the title). In Test Flow tab, check Insert and With Page Style in Breaks section and choose Chapter style in the drop-down menu. Click OK.

With this modification, page style is automatically set to Chapter whenever you start a new chapter.

Now, click in the header area of an odd-numbered page. InsertFieldsOther.... Go to Cross References tab if not already there. Select Headings in the left pane, Reference in the bottom pane and the appropriate chapter in the top pane. Click OK.

Set your header paragraph to Header right so that you can apply a different alignment (and other attributes) for left/right pages.

Do the same in an even-numbered page with style Header left.

Of course, this is very short to start with. Experiment with all the endless possibilities to fulfil your needs.

If this answer helped you, please accept it by clicking the check mark to the left and, karma permitting, upvote it. If this is what you expected, close the question, that will help other people with the same question.