Problems with pagenumbering

I am working on a masterdocument with several (12) subdocuments.

  • The title page in the masterdocument is not numbered
  • The Index pages are numbered i and ii
  • The page with the preface starts with pagenumber 1 (I had to shift pagenumbers with -2 for this new section), subdocuments are numbered correctly.

After adding the profile for the preface to the index, I see in the index that the preface has number 3. All following items in the index also show the wrong number (=+2)

Question 1: How can I synchronize the pagenumbers in the index with the real pagenumbers.

After exporting the document to PDF, the index for the PDF-document does not contain an item for the preface.
The index starts with the first heading.

Question 2: How can I create a correct index for the PDF?

Ben

(inline image display enabled by ajlittoz)

I have included a stripped version of the masterdocument which contains only a few pages of the first subdocument.

Japans_TEST.odm
Japans_TEST_ Schrift.odt

I don’t understand the issue with the preface. If the answer does not cure the problem, edit your question to improve the description for the preface issue.

The odt-version of the document has an index with as first item “Voorwoord” starting on page 3. When opening the PDF-version (with Okular), the index for the PDF does not show that preface (nor the alfabetic Index at the end of the document). I have added a screenshot to the original question.

The screenshot seems to be taken from Okular (according to the outline at left) and it shows “Voorword…3”. So what is the question?

The screenshot shows the index from the pdf (side-bar in Okular) together with the content from the pdf-document. As you can see page numbers are different and in the pdf-index, the first item (“Voorwoord”) is missing.

Apologies, I misinterpreted the screenshot! If I still can’t find an explanation, I’ll request to attach a sample file. Stay tuned.

By playing with a page offset, you didn’t change the real page number. This must not be done unless you know the consequences.

A page offset is related to (cross-)references, i.e. you request the page number for the page located at current +/- page offset. Usually you get what you hoped for. But if the requested page does not exist, the result is a “void” value. This will be the case at the beginning or end of the document. Think of page offset as similar as “next/previous page”. If it doesn’t exist, it is blank.

In the TOC or index, you have a separate capture of page number. There you can’t specify an offset which would be nonsensical. You get the real page number.

Your question boils down to how to modify the real page number. The page numbering sequence is a property of page styles.

When you want a different page sequence, you use a different page style. You separate the different parts in your document with manual page breaks Insert>More Breaks>Manual Break so that you can access a configuration dialog allowing you to choose the next page style and the starting page number.

EDIT 2021-07-18 - Unnumbered chapter heading

Since chapter headings are part of a “standard” Writer list (with additional properties), the usual tricks can be used. Note the tricks are direct formatting and may lead to unexpected results if you reorder the chapters. As with any direct formatting, remember you did so.

Your “Voorwoord” heading can be styled Heading 1. It is then numbered. Put the cursor at the very beginning of the heading (before letter “V”) and press Backspace. This removes the number (and renumbers all following Heading 1) but leaves the indent. To suppress the indent, press Backspace a second time.

This trick avoids the need to create an unnumbered Heading 1 substitute. It also makes sure that your unnumbered entry will always be formatted like the numbered ones (depending on how you created your unnumbered level 1 style, you may end up – and this usually the case – with an independent style: the modifications made to Heading 1 are not forwarded to your style).

EDIT 2021-07-18 - Definitive fix

After analysing your sample files, here is the real fix and a few suggestions.

The culprit is the Voorwoord paragraph style.

You intend it to be a numberless Heading 1 and you derived it from Heading 1. Unfortunately, derivation does not copy all attributes of the original style. Notably, Outline & Numbering parameters are reset to some “neutral” state to avoid creating problems with chapter numbering. The derived type is attached to Outline level Text Body. This is why it is not forwarded to the PDF TOC.

Apparently, you detected the situation because you “corrected” Writer-TOC generation by requesting Additional styles in the TOC configuration and added Index Heading (to include the alphabetical index in the TOC) and Voorwoord. However, doing so does not tag Voorwoord as being part of the outline. It only adds it to the Writer-TOC and PDF exports does not take it into consideration.

Set Voorwoord outline level to Level 1 and remove it from Additional styles. It will be collected in the TOC and also exported to PDF-TOC.

When fiddling with Heading 1, you removed it from Heading dependency and made it an independent style. This is not a good idea when you’re in the “polishing” step of your work. You lose an automatic formatting function and will have to be careful if you tune your chapter headings formatting.

Also you create a useless dependency Heading 1→Kop 1 zonder nummer→Voorwoord. You’ll be better off having Voorwoord directly depend on Heading 1. Moreover, Kop 1 zonder nummer seems to be used only for the book title. It should not then interfere with the Heading n hierarchy. For book titling, paragraph styles Title and Subtitle should be used.

Finally, it looks like your “common” text is styled Defailt Paragraph Style. Though this is the standard in M$ Word, don’t do it in Writer because this this the ancestor style to all others. Any modification you make here is inherited by all other styles. E.g., you configured a first line indent and had to cancel it in all other used styles, such as Heading 1. To avoid this undesirable side-effect, “common” text should be styled Text Body. Changes to this latter style has no repercussion on Heading n or Contents n. This is much more user-friendly and comfortable.

Styles are your friend but you must learn how they are grouped in tribes. To see that, select Hierarchical at bottom of the side style pane.

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!

The first section (with Title page and Index) uses the Roman numbering, The second section/first document (and all the other subdocuments) uses Arabic numbering. The new style was inserted by first inserting ‘Text’ in the masterdocument and inserting page break and new style into that text-element. In the masterdoc, I can select the page-layout for the masterdoc itself and sections for the subdocument. When working in the subdocs, I can choose page-layout. I can select the different styles to be used for the pagenumbering but nowhere I can see how I can adjust the starting number (which should be 1 for the first subdoc). As you explained, I shouldn’t change the offset. Are there any other was to adjust the starting pagenumber?

The special manual page break must be inserted before the TOC. I assume the title page, index (TOC?) and preface are all directly typed in the master while the chapter are subdocuments. Put the cursor before the “Voorword” paragraph and insert the special page break here.

Alternatively, put th cursor in the “Voorword” paragraph. Format>Paragraph, Text Flow tab and force a page break before with the required properties (page style and starting page number).

The “Voorwoord” (preface) was a separate document. At your suggestion, I transfered the text to the masterdocument and inserted a special page break between the index (=TOC) and the “Voorwoord” (=Preface). The different sections now have correct pagenumbers. (2 Title-pages have no number, TOC numbers i-iii. “Voorwoord” has number 1). The TOC for the pdf-document show the actual page-numbers. Actual page number 7 corresponds to page 2 in the odt-document (“Japanese writing…”).
I can imagine why pagenumbers are different in the PDF-TOC and the odf-TOC. I still have no explanation why both the “Voorwoord” and the alphabetical index don’t show in the PDF-TOC.

I see that “Voorword” has no chapter number. Which paragraph style have you applied? In case you defined a user style, which are the attribute in Outline & Numbering tab?

Since I didn’t want a chapter number for the preface, I defined a separate style for “Voorwoord”. I didn’t specify attribute for Outline & Numbering for this style. The style for the alfabetical index (that is how it is called in Dutch, I don’t know the English name) is not numbered neither. Both these styles were added to level 1 of the TOC and show up in the ODT-TOC but not in the PDF-TOC.

If you correctly set the Outline level to Level 1 there should not be any problem.

For in-depth analysis, attach a sample file to your question (the “paperclip” tool is not available in a comment).

See my answer update for an alternate solution.

I have added two test-files; a masterdocument with the preface, one subdocument and the alfabetic index, and a stripped version of the first subdocument itself.

Thanx for the explanation. I’ll restore all the styles to the standard and then start all over again with working on the layout.

Ben