# Chapters with headers on all but the first page of a chapter

I have spent days trying to get this to work and am coming to the conclusion I can figure it out.

I have written a book and would like to add chapters with headers. The chapters exist by using header 1 for each chapter.

How do I add a heading line for each page in the chapter except the first one?

I did create a style to have a header on all pages but the first. I quickly learned that one can not simply change in a existing document the style as it changes all pages.

So, I am sure there is someone out there that has been able to do this, but it is beyond me.

Thanks so much in advance! ignorant tom

edit retag close merge delete

Sort by » oldest newest most voted

For each chapter you need to create a specific page style (possibly derived from a common page template), each specific page style clearly with a different name from the others

Only with a specific page style (eg ch1 for chapter 1, ch2 for chapter 2, etc.) can you define a different heading for each chapter. In each of these page styles, in the heading tab, deselect the "equal content on the first page" flag (check-button flag)

This will allow you to fill in the headings of the first page of each chapter with a different text than the heading of the second

If you do NOT deselect this check box you can only edit the heading of any page in the sequence that you have formatted with a given page style (eg ch1) and all other pages with the same style, automatically, will be re-proposed with the new content

At the end of each chapter insert a manual break (not a simple break page): menu insert-2° entry (other break)-last entry (manual break)

In the form that opens, use the combobox "Style" and in the list choose the name of the page style common to all the pages of the next chapter (eg ch1, ch2, etc)

The heading of the first page of each chapter leaves it white, the heading of the second page defines it however you want, and in the following pages, until the next manual break, you will find yourself the header of that repeated chapter.

more

That seems to do the trick! Thanks so much for your help! I would never of thought to create a style for each chapter.

Thanks again!

( 2019-11-06 22:30:05 +0100 )edit

Good ! However, if all the chapters share the same header text (that is, if each chapter retains the same header as the other chapters), the solution proposed by mike is certainly more effective, especially point 5 of its procedure.

( 2019-11-06 23:21:15 +0100 )edit

If I understand correctly, you need to have identical page layout for each your chapter, which is having a page with no header on the first page of the chapter (the one that starts with the chapter heading), and having pages with identical headers for the rest of each chapter (the content of the headers being the same across the chapters, e.g. showing page number, and/or chapter name, i.e. the same fields and static text).

This is done with correct setup of page styles and paragraph styles.

1. Create a new page style named "Chapter pages"
2. For the "Chapter pages" style, enable headers
3. Create a new page style named "Chapter 1st page" (make sure it doesn't have headers enabled)
4. In "Chapter 1st page", make Next style on Organizer tab point to "Chapter pages"
5. Now go to paragraph styles, and in "Heading 1" style, on Text Flow tab, set InsertType: "Page"▸Position: "Before"▸With page style: "Chapter 1st page".

From now on, each of your chapters (starting with Heading 1 paragraph) will start on a headerless page, after which pages with uniform headers will follow.

I quickly learned that one can not simply change in a existing document the style as it changes all pages.

Specifically, page styles are applied to ranges in the document, which start and end in paragraphs with page breaks with page styles. I.e., if you don't have paragraphs with page breaks with page styles in your document, trying to apply a page style at any place in the document would quickly run through paragraphs starting from current to the start, looking for such a break-with-page-style; will not find one; and so it will assign the page style to the very first paragraph of the document; the page style (and its sequence defined through "Next style") will be active until the next break-with-page-style (in the absence of such, until the end of the document).

more

I completely ignored the functionality described in point 5 of your procedure. Remarkable. Your technique shown in point 5 works perfectly ! The document becomes a succession of chapters, initiated by header 1, and then an alternation of "Chapter 1st page" page styles followed by a list of "Chapter pages" styles.

But if each chapter required a different specific header, as I had mistakenly understood, how do you modify the solution?

If you change the Chapter pages header, in any page, change the header of all the chapters, this results from my test and from 2° part of your answer. So, there is no need for so many "Chapter pages" page styles, with different names, as many as there are chapters? Because in this case it would no longer be possible in "Chapter 1st page" to define the next style page. Do solutions exist in this case that do not force ...(more)

( 2019-11-06 21:01:29 +0100 )edit

Secondly, if you create a personal page style, it seems that it cannot be inherited from an other personal page style. Is it so?

( 2019-11-06 21:07:53 +0100 )edit
1. Re: "if each chapter required a different specific header": it depends on what is "different". If the difference is inside of what is possible to do with fields, then you still can use single style, and use fields (including "set variable" field on the first page of the chapter, and "show variable" in the headers). If, however, that's not possible, and you need e.g. to layout stuff differently, then ... you'd need multiple styles, as you suggested (but that would be an exceptional case: I don't believe those cases constitute any sizable percentage of typical use scenario).
2. Page styles inheritance is not implemented (yet): tdf#41316.
( 2019-11-06 21:16:09 +0100 )edit

I was referring to the case in which each chapter has its own textual content of the header, while the page, date, etc. fields remain unchanged

I hadn't thought of the use of user fields in the header associated with variables (I know little about the fields, I'm discovering libreoffice little by little since May, and so far I've focused a lot on the star basic macro, appreciating some sections but surprising myself for some rigidity and limitations in others, not always solvable)

I'll do a bit of testing on the fields in the headers to see if, working on multiple variables, one per chapter, you can work around the problem by keeping in mind that it is uncommon to work on a large number of chapters in a document

Very thanks for the anwsers.

( 2019-11-06 22:15:06 +0100 )edit

Can these chapter specific page styles be applied to my current book or do I have to create the book all over again?

I tried something similar to what you are describing, but it seemed that all pages got the same header from the last style applied.

more

Just create the page styles, all the same apart from the name. It is important that the "same content for the first page" flag (in Italian "contenuto uguale nella prima pagina") is not enabled. So you don't have to rewrite anything in your book.

The only change to your book is to insert a manual break at the end of each chapter by choosing the name of the page style you want to use. Having already created all the necessary page styles first, the combobox associated with the "style" entry proposes them all in the list.

It is important to reiterate that you don't have to insert a simple break page, because that doesn't change the page style.

The manual break associated with the page style name also allows you to resume page numbering from wherever you want.

Before answering, I tried this tecnique. It works, the ...(more)

( 2019-11-06 02:07:57 +0100 )edit