Master document: page number restarts for each document

I am working on putting together a book. I have four sub-sections now, and have put them into a master document. I have inserted a footer with the page numbers, and have run into a problem. The page numbers restart for each sub-document so I do not get consecutive page numbering for the entire document.

I’ve been trying for days to fix this. I am able to create a mock master document (using none of my own documents) with consecutive numbers, but when I insert one of my documents, that subdocument starts the numbering over. I have tried changing all the styles in my subdocuments back to the default and moving the data around in my documents. The answers here to similar problems say to change the text flow in the first paragraph style on the page to insert a break, but my mock documents (that does work) doesn’t have that, and when I try it on my real document, it doesn’t resolve the problem and introduces others (a page break after the first heading).

I am clearly not understanding something here, and suspect that one of you will be able to instantly point me in the right direction. I am (obviously) new to LibreOffice. Any help will be very much appreciated.

Here is (hopefully) my test master document that had consecutive page numbering until I inserted my sub-document.

master-test.odm

[Edited to say] here are the sub-documents, as requested.

Liberty County Estate Inventories Part 1_1762-1777-test.odt

test1.odt

test2.odt

Stacy

Your master document is useless without the included docs. As is, I get 2 pages First page contains a single paragraph Default Style “Title Page”, then a “common” page break. Second page starts with an empty Default Style paragraph (the owner of the page break), then 3 placeholders for th included document. Footer of this page shows “2 of 2” as expected.

Problem may lie in one of the sub-docs, So, edit your question (don’t answer) to attach your sub-docs.

Thanks for the response! I have added a link to the sub-document linked to in my “test” master document.

Stacy, my mistake, looking at it now. It appears that you must have brought this over from some very old OpenOffice or other editor. I am going to try to use the standard style that comes with LO6.3, copy and paste into new documents and see if the problem still recurs. Let you know in a bit.

Thank you for checking, doktoroblivion! I couldn’t access your link. Very interesting, because I created the master document as a test and was able to get the two test documents to number correctly, but when I added my original subdocument, it numbers that section separately.

Thank you, doktoroblivion. Yes, the original records were created in Google Docs, then compiled in OpenOffice, and then I realized that I wanted to have an overall index so put them into LibreOffice.

Yeah, still looking, there is a property for this, just have forgotten where it is, since I myself shut it off. Hope to let you know soon.

Thank you SO much!

Then be kind enough to accept my answer. Click only once on the gray tick mark, even if it si not responsive.

ajlitoz, I’m sorry, I was actually thanking doktoroblivion for continuing to look and hadn’t scrolled down to see that you had answered! Thank YOU so much. This makes perfect sense to me. When I was proof-reading the documents, I had found numerous instances of manual formatting and thought I had removed them all but obviously that’s not the case. I really, really appreciate your time and the explanation.

The structure of your master document is :

  • Some initial text typed in the master
  • test1.odt
  • Liberty … .odt
  • test2.odt

Page number for the “Libety …” part restarts at 1.

Note that there is no “master” text between the included sub-documents.

For a reason I don’t explain, Writer adds from its own initiative a page break between the sub-docs. It is very difficult to tell who is the owner of this page break.

I then insert “text” with empty content (only a paragraph mark) before the “Liberty …” file. This text is added to the master document. Now the page break can be examined. Bingo! Edit Page Break now reveals that it is a special forcing page break explicitly calling for Default Style page style with page restart at 1. Then no surprise that page restarts at one.

Further analysis shows that this forcing page break was added as a manual formatting to the first paragraph of “Liberty …” file. Remove it.

Remember that manual formatting is the source of all evil with regard to formatting. Avoid it in all circumstances. The licit cases can be counted on the finger of a single hand.

Personally, I never include sub-docs without having some master “text” between them. This text belongs in the master and allows me to control the page style transitions and other formatting parameter. You can object that even a single line paragraph occupy space and may ruin the carefully crafted formatting of the sub-doc. I mitigate this by having a dedivated page style for my technical formatting control paragraph: font size at 2pt. (absolute minimum) and spacing above and below at 0. This small 2pt offset is practically unnoticeable.

Formatting correctly a master document and its sub-documents is rather tricky if you are not fully aware of what’s happening under the hood. Style-wise, those in master override the sub-docs styles with same name. Only sub-doc styles without equivalent in the master surface when formatting is done. BUT, always, always, direct formatting is kept and sometimes cannot be controlled or removed from the master, as in your case.

So, check your other files.

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!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

I think she only needs one text (master) doc. What she really needs is a template based approach to her document. Then, she should override, in the template, the text flow for any header where she needs an extra page, and insert a simple page break for that, as you suggest. When I did this, it fixed the page numbering issue.

The main reason why I insert a “text” between the sub-doc is the headers are not transferred to the master (as is demonstrated with the "Liberty " file). They must be regenerated. This can be done only if you transition to a new page style. This is the purpose of my tiny “technical” paragraphs. In my case, the master document is a “catalog” synthesis where each “chapter” is an included document. Unfortunately, the header do not transfer as I said; therefore, any attempt to use a single page style all over the document with field insertion in the header fails (a- no transfer sub->master, b- no field access master-> sub to sub properties).

Stacy, the problem is you have some direct formatting that is overriding your page numbering. Here are the new files which fix this issue.

master-test-standard.odm

test1-standardtemplate.odt

Liberty County Estate Inventories Part 1_1762-1777-test-standardtemplate.odt

test2-standardtemplate.odt

My suggestion would be to make a template for all the formatting you want to do and base each sub-document and the master off of that, so that you don’t run into other issues like this going forward.

BTW. I also included an index to check that the numbers aligned correctly.

As for manual formatting, its not the root of all evil, but once you do down that road things are much more difficult to manage. That is why I suggest you develop a very good template, with your abstract and other format properties. Again, it should be used by both your master and sub-documents. If you have to make a format change, you should change the template and re-apply the changes to all documents, it will prompt you. Otherwise, like @ajlittoz suggests, you will slowly spiral down into trouble you will not be able to mitigate.

@stacy, do not use my stuff out of hand, but as an example to base your template off of, otherwise, you will probably have other issues. If you are not sure how to do this, let me know, I can probably create one fairly easily for what you need and attach here, let me know.

@doktoroblivion, I just saw your answer after I had commented on @ajlittoz’s answer and added mine. Thank you! I am going to be doing other similar work and will definitely use the template suggestion and look at yours as an example. I really appreciate the help from both of you. This was the last step I needed and your kindness in taking the time to help a complete stranger is wonderful.

After @ajlittoz responded that the problem was the manual formatting, I went into my sub-documents and tried highlighting the initial text of each one and then Ctrl-m (remove manual formatting). (In my case I had two headers at the beginning of each sub-document, so that’s what I highlighted to use ctrl-m.) I saved them, and updated my master documents – and it worked! The page numbering is now consecutive across the entire master document. I did not have to insert text between the sub-documents (but will remember this trick for later should I need it).

When I was initially proof-reading my subdocuments (which I had imported from OpenOffice and Google Docs), I had found numerous instances of manual formatting that prevented page numbering flow within the sub-documents themselves. I had found it by changing the fonts in my custom styles to something very obviously different, which made the manual formatting stand out. In the future, I think I will ‘select all’ in the imported document and ‘remove manual formatting’ to make sure I get rid of it all, even the unseen parts.

I’m putting this as a separate answer since I was able to resolve it without using the text spacers. Thank you again, @ajlittoz!