Page and footnote numbering issues in chapters

Hello,
I’m using Writer (LibreOffice version 6.4.7.2) for creating a book with one file per chapter, with the first page of each chapter styled as ‘First Page’, and all other pages in Standard style. No problems there: page numbering as well as footnote numbering start at 1 for each file, as expected.

However, when I copy/paste the subsequent chapters into one document containing the full manuscript, both numberings do exactly what I don’t want them to do:

  • Page numbers start with 1 at the beginning of each new chapter - even though I set each chapter’s title page style to Standard instead of First Page.
  • Footnote numbering, however, does the exact opposite: it starts at number 1 for the very first footnote, and increases throughout the document, instead of starting at 1 again at each chapter.

I’ve spent a coupe of hours searching for a solution and trying different things, but I can’t seem to find a solution. Especially the page numbering resetting to 1 for every chapter is a bit annoying, because the whole reason for creating the single document is for proofreading, which requires contiguous page numbering. (The footnote issue I can live with.)

Could someone point me in the right direction? Or is there a proper tutorial on how to set up a book with chapters and all? The ones I can find are mostly for small booklets and similar stuff.

Thanks already,

Richard

Upload a sample file which shows the problems, please.

Give additional details:

  • are you creating a master document where your chapters are sub-documents?
  • or do you really copy and paste your chapters, duplicating their contents into a new distinct file (the “book”)?

Page numbers restart at 1 only if you force them so with a special manual page break at the beginning of each chapter. This “magical” page break may be an explicit manaul one or an implied one if you customised Heading 1 paragraph style (assuming that your chapter headings are so styled).

Remember also that, if you really pasted, formatting is also transferred to the new document.

Important: tell us how you format your documents: styles or direct formatting?

Hello, Grantler, ajlittoz
Numbering_Problem.odt (27.5 KB)
See attached document.

are you creating a master document where your chapters are sub-documents?

No, I just created separate documents and thus separate files, using page and paragraph styles that were included with LibreOffice by default, except for the chapter title (‘Heading 0 Document title’, Kop 0 Documenttitel in Dutch) that I created.

or do you really copy and paste your chapters, duplicating their contents into a new distinct file (the “book”)?

Yes, this is what I did so far. The only page change I applied was changing the chapter title pages back from First Page to Standard (or Default). See the attached example file.

Page numbers restart at 1 only if you force them so with a special manual page break at the beginning of each chapter. This “magical” page break may be an explicit manaul one or an implied one if you customised Heading 1 paragraph style (assuming that your chapter headings are so styled).

Hmm, I may have to look into this. Showing non-printing characters (Ctrl + F10) reveals nothing special on the page boundaries.

Remember also that, if you really pasted, formatting is also transferred to the new document.

Yes, that is obvious.

Important: tell us how you format your documents: styles or direct formatting?

I use styles exclusively, no direct formatting. However, there seems to be a problem here too: when I change e.g. a style’s font size, parts of the text remain in the old font size - until I clear all direct formatting (Ctrl+M), that is.
One example of this is found in the attached file. At the top of the second page, there is this line, in a style with font size 12:

[sample text introduction, page 2 = OK]

Now when I change the style’s font size to e.g. 9 points, the whole line is modified as expected - except the word ‘introduction’, which stays in 12 points until I select it and remove direct formatting with Ctrl+M. The same thing happens with the word ‘but’ at the top of the last page.
This behaviour seems pretty erratic. In the attached document, I did not use any direct formatting whatsoever, and I have no idea why this happens and how to prevent it from happening.

No doubt, I’m doing several things wrong, which is also why I’d be interested in tutorials for properly structuring documents (but no videos please, just text …).

Anyway thanks for the replies so far!

There are several issues in your formatting.

  • Direct formatting
    Contrary to your assertion, there is direct formatting in your document.

    • vertical spacing
      Spacing text with empty paragraphs is a form of direct formatting. This vertical spacing should be a property of the style of the next or previous paragraph (tab Indents & Spacing).

    • manual page breaks
      If a page break always occur at start of a chapter, this page break must be an attribute of the style (for chapter heading) in Text Flow tab.
      This also avoids discrepancies caused by manual insertion: the one before introduction doesn’t request page number reset, while the others (chaps. 1 & 2) request page reset
      I don’t understand why there are so many manual page breaks.

    • character/paragraph direct formatting
      Present in MAIN TITLE, word “introduction” (you mentioned it), all chapter heading, all footnotes, practically all texts between [ ]
      I stopped after chapter 2 heading as it is unnecessary to go farther.

  • Document outline
    You messed up Tools>Chapter Numbering removing Heading n (n=1 to 3) from the list of styles member of the outline. Even if you kept the outline level in the style definitions, this will disturb Writer in recognising chapter boundaries and definitely prevent you from creating a TOC.

    • Main title
      If “[Main Title]” is supposed to be the book title, it must not be part of the outline. Built-in Title is dedicated to this usage. It is at Text Body level because it does not go into a TOC. To further format the cover page, you also have Subtitle.

    • Chapters and other headings
      Due to your assignment of Kop 0 Documenttitel to level 1, you offset Heading 1 to 3 one level deeper. You change then the recognition of chapter boundary because it is presently hard-wired to level one (an enhancement request is pending to change that).
      This forces you to use Kop 0 … for chapter start, which is inconsistent with its usage as book title. And also inconsistent with “Introduction” style Heading 1. "Introduction is also a chapter heading with same importance and level as “Chapter 1”.

  • Footnote numbering
    Footnotes can be numbered by chapter if you request so in Tools>Footnotes & Endnotes. Due to your faulty use of Kop 0 … for chapter start instead of Heading 1, it works.

My two cents advices:

  • restore the standard Tools>Chapter Numbering configuration and Heading n level hierarchy.
  • separate (style-wise) book title from chapter headings
  • configure Tools>Footnotes & Endnotes to number footnotes per chapter.
    Warning! It works only if chapter headings are at level 1.
  • set the page break before chapter start in Heading 1 Text Flow so that it becomes implicit (no more direct formatting)
  • MOST IMPORTANT: get rid of all forms of direct formatting; some are really insidious and treacherous like vertical spacing with empty paragraphs. Consider that every paragraph has contents and semantic value. An empty paragraph is equal to “void meaning” and this is a logical nonsense. “Void meaning” has no place in a discourse.

Additional remark:

  • you defined a Kop 1 Hoofdstuk Genimm. If I read Durch correctly, this means unnumbered. Don’t mix different paragraph styles at same level. It is possible but advanced usage and you don’t seem skilled enough for it. If your intent is to have unnumbered chapter headings, like “Introduction”, simply type Bksp at the very beginning of the heading. This will dispose the chapter number while keeping without fuss the heading in the TOC.

Thank you for your elaborate answer!

As mentioned already, I’m still learning the finer details of using styles etcetera. I used the (many) manual page breaks to demonstrate the page numbering behaviour without filling those pages with text.
I was aware that I should be using styles rather than direct formatting, although I didn’t fully realize that this also applied to using empty lines for titles. I shall define a proper chapter title style, and of course check out the many other things you mentioned.

However, I’m still puzzled about those separate words having direct formatting. I simply typed these without manually selecting anything (font size or any other property). But maybe this also resolves itself once I understand and fixed the rest of those formatting issues.

I think I’ll also document what I learn here - maybe I can turn it into a small tutorial that might in turn help others who are struggling with this subject. I’ll return here if I have any major questions that I don’t understand or can’t find the answers to.

So thank you again for your great help! I’ll get working on it right away.

One last question: is there a quick way to search for text with direct formatting?

I think I cleaned up everything as per your directions, but I’m not completely certain. I could of course select all and then do Ctrl+M to remove all direct formatting, but then I could lose formatting that I hadn’t spotted yet, and still need to convert into a style.

Unfortunately no.
What you can do is proceed paragraph after paragraph. A quadruple-click selects the paragraph. Ctrl+M. Then Ctrl+Z and Ctrl+Shift+Z in rapid succession to see if something changes.

I think I found a way: open the Search & Replace dialog, and search the text for subsequent explicit formatting styles, in my case italic, bold, superscript, and subscript. It would appear that formatting that is implicit in a defined style (e.g. italic, that I use for quoted text) is not recognized as such; it only finds manually applied italics. Perhaps I’ll create a macro for these separate search-and-modify actions, as I have several more documents that need cleaning up.
Especially searching for superscript prevented some nasty mistakes, as the auto-formatting feature automatically changes the ‘th’ part of ‘19th century’ into superscript formatting - direct superscript formatting, that is.
What this tells me is that together with the many direct formatting icons on the toolbar, LibreOffice is in fact steering users in the direction of not using styles. I’d almost suggest that there should be a ‘Professional Mode’, where e.g. clicking Bold does not apply direct bold formatting, but instead the Strong Emphasis character style (which has the exact same visual effect).
Anyway, I think I have the whole document (a couple of hundred pages) completely ‘stylized’ by now :slight_smile:
Thank you once again for pointing me in the right direction!

You can disable the 19th → 19th transformation and many others in Tools>Autocorrect>AutoCorrect Options, Options tab.

These courtesy transformations were offered for those who think Word has an “intuitive” behaviour. I agree with you this is not “professional”, but you can fix that in AutoCorrect.

Note that all transformations made by Writer as some kind of macro will direct format your document. In particular, so-called “table styles” are not styles according to the traditional definition. They are macros triggered by various events which direct format the table. It even goes to invalidate any styling you could have applied into cells. Don’t use them.

Regarding application of Strong Emphasis, this can be done for Ctrl+B but AFAIK not for the toolbar button. Just reassign the shortcut in Tools>Customize, Keyboard tab to a style. Advantage: you no longer leave the keyboard for the mouse.

You could try View > Toolbars > Formatting (Styles) but the available icons might not be sufficient for your use of italics or bold, e.g. Emphasis character style is italic but you might also have another character style for foreign words, such as ab initio, so two character styles that have the same effect but used for different purposes.

Personally, I use the sidebar or keyboard for styles. Using the Applied styles filter for the sidebar makes it quick to choose from existing styles.

Thank you for your thoughts. I (re)defined some keyboard shortcuts for italic, bold, superscript and subscript as character styles, and that works just fine. As ajlittoz already said, this has the advantage that I can keep on typing, without having to switch to the mouse and back.
I shall do the same with other styles as and when I need them.
Thanks again, regards,
Richard