Where master docs (extension .odm) come into play in your question?
Optional page numbers
This is in fact a matter of differentiated header or footer in various “parts” of your document.
A header or footer is an attribute of a page style. Therefore if you want different headers/footers across the document, you’ll apply different page styles.
A page style controls geometry and layout of a sequence of consecutive pages bounded by a special form of page break. When you want to switch to another page style, you Insert
>More Breaks
>Manual Break
where the pop-up dialog allows you to choose which page style becomes active after the break and optionally to start numbering with a forced page number. This implies that the page style already exists. So, start by designing your page styles.
Thus, you can have a page style for the front matter without header/footer (page numbers are not visible), then one page style for the TOC with a footer and e.g. Roman page numbers starting at i. I recommend you keep Default Page Style for all your chapter (main discourse) with a footer and usual page number starting at 1. A single page style is sufficient for all chapters when using fields in header or footer to repeat chapter heading. Create another page style for alphabetical index or back matter if this page style is different from front matter or TOC (yes, the same page style can be reapplied to a different page sequence, just like the same paragraph style can be applied to different paragraphs supposed to have the same properties).
Switch to a page style can be automated when it occurs in a well-defined context, e.g. at start of every chapter to go to a right page. In this case, the page break can be encoded in the Text Flow
parameters of the paragraph style. You no longer need to insert manually the special page break.
Fake heading
I think you mean heading in your question. A header is an area at top of page showing a repeated title or page number on every page. A heading is an intermediate title starting a chapter, subchapter, … Headings are usually collected in a TOC.
The simplest way to insert a non-TOC heading is to clone the corresponding Heading n. You right-click on the style name in the side style pane and New
. Give it a name and OK. The new style is an exact copy of the initial style, except it is not attached to an outline level. Provided you don’t modify anything in its configuration, you new style will keep in sync with the original one: whatever you change in the original Heading n is automatically forwarded to your custom style. Thus, you only adjust the original one and visually your non-TOC heading is indiscernible from a true TOC heading.