Can I have a different header (with its own page numbering) for each chapter?

I have about 100 individual short (1-3 pages each) documents prepared, each of which needs to have its own header with its own page numbering beginning with 1. I would like for each of these sub-documents to begin on a right-hand page.

I’ve been trying for a very long time to find out how to combine these into a single document. As Chapters? As Sections? (What’s the difference, to start with?)

I also have (separately, but eventually should be merged) a Title page, a couple pages of Front-material, and an Index - probably not formatted correctly.

Can someone help me do this? I am using .odt files made by converting .docx files to .odt with LibreOffice; I have JUST updated to version 6.4.4

Thanks -

Hi Martha. Have you looked at chapter 16, Master documents, in the Writer Guide? Download as ODT or PDF from Writer Guides | LibreOffice Documentation - Your documentation for LibreOffice

It is designed to do what you want. I put this as a comment because I have not personally used Master documents so I am not in a position to help you on specific aspects. Cheers, Al

Actually I believe that’s where I started, awhile ago - but got very confused trying to follow it. However, tomorrow I will go back to it and try again - I’ve learned a lot in the meantime, so I expect I’ll be better able to understand it. Thanks!

Is there any reason for having separate files? Are they really independent from each other?

Considering the capacity of modern apps and computers, separating chapters into files should be motivated by a specific workflow (e.g. using the same file in different “books”) or publishing the parts independently from the merged whole.

I’ll give adapted advice after you’ve described your purpose.

Hi ajittoz -
The first reason for having separate files is historical: they were digitized into .docx files from scans of the actual hand-typed pages.

This a “Session Index” to my field recordings in Bulgaria, from different trips. When I started making these we did not have a computer, so I typed them on a typewriter.
Now. They are being digitized using some plain text, and two kinds of tables (for future database purposes). The page header of each file shows the location, date, and page number within that village. I’ve been using page headers so that if a table spans two pages, that information shows at the top of each page. It stays there regardless of font size, and other changes. If I simply incorporate them into the body of the page, any change in page length means re-positioning them.

I hope this clarifies.

Since they are already digitized into separate files, could I not re-define the page style of each document with its own name? That would be simple!

Digitized (with a scanner?): is every page an image? Have you run an OCR (optical character recognition) application to convert to text?

Headers contain “primary” information not found in text: this is the most difficult case for master/sub-documents because header data is not forwarded from sub-doc to master.

No!! They were originally typed on a typewriter; the scans are merely the vehicle for sharing the text to the person who is typing them into a word-processor! OCR is not helpful because a) they’re mixed Bulgarian and English (and characters even if they LOOK the same MUST BE identified correctly, so they can be searched); b) formatting would be a problem because we’re changing from simple document typing to typing-in-tables.

I am NOT using a master-document, just treating each location as a separate chapter. I’m willing to go through the hassle of having about a hundred page styles… I made great headway y’day but now am stuck again. I think I’m defining the page styles starting from the wrong place, because today I don’t seem to be able to enter new chapters. I’m millimeters from being able to do it! but need a little direct help. Is there any way I can share my document, and annotate what the problems are?

There are two ways to share documents:

  • attach to the question, but the whole internet will be able to download them; so, usually, the attached docs are short anonymised sample ones
  • enter private mail exchange if th problem is not of general interest

Tell me which one you prefer

Private email please, how do I do that?

Contact me on ajlittoz (at) users (dot) sourceforge (dot) net (replace the descriptions by the separator and remove spacings to get an @ddress) and I’ll send a real e-mail.

Obfuscation above is a spam-protection measure.

Email sent…

Generic answer: yes, each chapter can have its own header.

Header and footer are attributes of page styles.

Basically, you must create one page style per chapter. You switch from one page style to another with a specific page break, either with Insert>Break>More Breaks or a page break included in the definition of a paragraph style.

Since you have ~100 chapters, this is not convenient.

If your header content can be extracted from some data in the chapter (e.g. a Heading x, x usually 1, paragraph), only one page style is sufficient: the header is the value of a field insertion and automatically follows the changes across the chapters.

Working with master/sub-documents introduces an additional level of complexity. You must make sure that styles are the same in the master and sub-documents if you don’t want to be “surprised” by formatting differences. The best way to insure that is to base all files on the same template. “Templating” existing documents is very tedious and tricky, even for advanced users.

The second difficulty with master/subs is to fully understand that the styles in the master override those in the subs (this is why it is preferable to have the exact same styles in both). But variable style data is not forwarded from sub to master: this is the case for the header and even for the page style itself.

  • Imagine the situation where you carefully designed a page style with header in a sub-document, whose name is the same across the collection. When the master is assembled, what should be done with the headers? To avoid this issue, the master ignores the header and uses only the one defined in the master.
  • This means you must either define as many page styles in the header as including sub-docs and find a way to override the instructions given in the sub-document paragraph styles or work with the dynamic single page style through the use of fields.

Working with master/sub-documents also requires a very strict style discipline. Since your docs originated in Word, I bet they need a tremendous restyling because Word is not as strict as Writer style-wise (it has no notion of character, page, frame and list styles and proceeds heavily with what is called direct formatting in Writer).

Without information on your use of the original material, I’d recommend to merge all the files into a single document through copy/paste if you have no independent need of the parts.

To answer your question about chapter/section: a chapter is a user-concept, it usually “translates” as content between two Heading 1 paragraphs; a section is a styled portion allowing to temporarily change the characteristics/properties of a page style (except the margins and header/footer). Chapter and section do not belong in the same semantic domain.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!