Writer: master document controlling page numbering of different sections


this is a quite complex issue to be sorted without the help of a reproducible example that I’m uploading here

I perfectly understand that I’m asking you something that might seems somehow dangerous (downloading a file to your local system) but please believe me that there is no harm at all and I could not conceive any other better solution to make myself enough clear

so now, I’ve defined a master document and given the above files structure what I would like to achieve is the following:

pages 1 and 2: footer with no page numbering (left blank)
pages 3 and 4: footer with page numbering in roman numerals (i, ii, iii, …)
page 5: footer with no page numbering (left blank)
page 6 onward: footer with page numbering in arabic numerals (1, 2, 3, …)

I’ve been trying to define within the master document odm corresponding pages styles but without much success (when applying a specific style it is also changing the upstream one, for some reasons I don’t really understand)

I’ve been fiddling with that for days up to now, desperately seeking help…

thank you


For page styles, see [Tutorial] Page styles and headers/footers (View topic) • Apache OpenOffice Community Forum

When you work with master documents, remember that a style in the master document will override the style with the same name in the sub documents. So, you can define paragraph style Heading 1 differently for each sub document, but when viewing the sub docs within the master document, the definition of heading 1 in the master document will be applied in all sub documents, so all sub docs have the same look and feel, if you use the same styles for the same hierarchical levels.

Define new page styles (just “create” new page styles, don’t modify them) for the different things you want, apply them in the sub documents where you want them (that’s essential). Then, in the master doc, define the page styles as wanted. So, for instance, the pages with roman numerals will have a page style called roman, you make that style in the corresponding sub doc, and in the master doc, but you only turn on the footer and set page numbers to style roman in the master doc. And so for the others.

ah, that’s the trick! i thought it was enouth to define the page style just in the master doc (as it override all others); I did not do that in the sub doc and that’s probably the reason why…
I’ll try that solution, many thanks for the help

that is exactly what happened to me, and stil happens, no way to get out of here…

“You’d want to select a block of text and apply a page style to it as you would apply a paragraph style to selected text. Or you’d want to put the cursor somewhere on a page and apply a page style to it as you’d apply a paragraph style to a paragraph with the cursor in it. If you do that, pages before and after that page will get the same page style, from the previous page style transition to the next. You may see that as a shortcoming in the software, but that’s how it is.”

the problem might be related to the use of master doc?

No, it has to do with how page styles work. Page styles are a tool to organize your document, so that you can control page numbering, headers, footers, page lay-out, etc. Because adding some text on a page can throw off your page flow, you can’t just select a page and apply a page style. When you add text in the middle of it, you’d get two half pages with that style and the other two halves with something else. For that reason you have to insert “page style breaks”. See the tutorial.

yes, I’m aware of “page style breaks”;
do I need to insert that page breaks inside the sub docs? because in the master doc it seems not allowed (for what is referring to the sub doc parts of the whole document);

Yes. Remember that the master doc only describes what effect styles have on your formatting. You have to apply the styles where you want them. It’s a bit odd way of thinking, you have to get around to that, literally.

the following dataset is one step further, close to what I need but not enough, unfortunately…

I have defined beside the page style “predefined” two more personalised page styles that I called:

  • “roman_”
  • “blank_”

I would like to achieve somehow the following ages set up in the final document:

  • page 1 - blank, no numerals (style “blank_”)
  • page 2 - blank, no numerals (style “blank_”)
  • page 3 - index, roman numerals (style “roman_”)
  • page 4 - preface, roman numerals (style “roman_”)
  • page 5 - part I, no numerals (style “blank_”)
  • pages from 6 to 16 - chapter 1,2,3 and sub paragraphs, arabic numerals (style “predefined”)
  • page 17 - part II, no numerals (style “blank_”)
  • pages from 18 to 28 - chapters 1,2,3 and relative subparagraphs, arabic numerals (style “predefined”)

any hint for that?

as you can see in my toy dataset there is still something missing to get to the final desired result…

No offence intended but you won’t go nowhere with the material you provided.

The first thing to learn with Writer is styles.

Start with paragraph styles. Presently all your text except headings are in First Line Indent (which makes no sense) and you use empty such paragraph to get vertical spacing. Writer is more powerful than a mechanical typewriter and this power allows you to care only for your text without thinking of formatting. All can be done automatically once you have designed or tuned your paragraph styles.

Download and read the Writer Guide for the basis.

The chore of your question is “how to translate part structuring into Writer concepts”?

Every time you need a part of a document which should be laid out with different margins, header/footer, type of page numbering, … i.e. a different page design, this calls for a different page style. Transition from a page style to the next is done with a special page break you configure with Insert>More Breaks>Manual Break, not the simple Ctrl+Enter which simply goes to the next page within the same part (same page style).

If the page style change occurs always in the same context (e.g. at chapter start), this special page break can be incorporated in the paragraph style. Merely styling the paragraph (heading) with the adequate style will automatically add the page break.

I don’t know how large your final document will be. Even if it reaches ~500 pages, don’t bother yourself with a master document and included sub-documents. You seem to be a newbie (again, no offence untended) and there are subtle problems with masters. Don’t confront them until you’re familiar enough with styles and cross-references (useful to give links to parts of your document).

Learn by small steps otherwise you’ll throw away Writer, pretending it’s scrap because you don’t understand the underlying concepts. (It looks like you’ve already messed up built-in paragraph styles and you’ve added character styles which betray your ignorance about their function – Default Paragraph Font and fontstyle01, not to speak of your LaTex family).

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 which is reserved for solutions) or comment the relevant answer.

strange enough, I think there Is plenty of Styles in those files

thanks anyway, I’ll try to work out a solution for the problem

ok, I think I finally managed to find the solution I needed

in very short, it’s a matter of:

  • creating the desired page style in the master documents (and in the sub documents, which are descendants from that)

  • apply the proper page style to the relevant part of the document

  • make sure that within each sub documents in the tab “text flow” corresponding to the break paragraph is going to be selected the appropriate formatting style to be used for the first page after the break.

a bit convoluted but works…

in my very humble opinion something that must be considered as a further of development in order to be smoothed and simplified as far as possible (or at least to be specifically explained in the documentation)

thanks for the help, a good lesson learned


That PLUS ADDITIONALLY part was IMO very much present in my tutorial. I want that tutorial to be helpful, so please, tell me why that part wasn’t clear right away.

yeah, may be, It might be just a problem of mine

but if you refer to your guide part “Three ways to get a page style break” it seemed to me that the second way you mentioned (the key to sort out my problem) it was somehow intended as a “standalone alternative” and not as “a complementary set up needed to get the final results”;

and all that drive me away from the solution because I start wondering to other sort of possible problems;

I would definitely rephrase all that part of the tutorial because it seems to me not clear at all and beside that I would also consider the possibility to upload a toy dataset (cross referencing the help text); not to mention that the tutorial should be updated with figures much closer to the last updated version of LO

I know all that it’s bit annoying but if your goal is to get clear enough to be operative it seems to me something definitely needed (also because in the official documentation there is not much mention of this kind of problems)


On second thoughts, I think my tutorial is right on the money.