Continuous chapter numbering across book parts

Some books are split into parts, but their chapter numbering does not reset with each new part. For example, Part I might contain chapters 1 through 5, Part II contains chapters 6 through 9, and Part II contains chapters 10 through 12. I’m using Heading 1 for parts and Heading 2 for chapters. Obviously, it resets the chapter numbering after every new part. Is there a way to circumvent this behavior, or do I have to number the chapters manually? (I’m guessing the latter.)

Update: Sorry for not being clear. I use style sheets and the chapters are subdocuments inside a master document. I have followed the 7.2 guide: Chapter 16 Master Documents

1 Like

I don’t know your way of working and I don’t know how your sub-documents were created.

Therefore it is difficult to give a correct information.

Please check here if you have used this logic:

Styles in global- and sub-documents

I assume that you use style sheets.

@Hrbrgr Sorry for not being clear. I use style sheets and the chapters are subdocuments included in a master document. A custom template with my defined styles was used for all the files.

The link above did not answer the question. Any other ideas? Or should I just make the chapters “Heading 1” and create a new header style for the book parts (not to be included in the index)?

Heading 1 and Heading 2 are associated with the same internal list style whose name is Chapter Numbering. This list style is locked so that you can’t use it for anything else (but this is not important).

This means all Heading n are members of a single multi-level list with all the usual numbering properties, i.e. when you switch from one level-i item to the next, all level-j numbers with j>i are reset.

What you want is two independent sequences, one for your Heading 1 and another one for Heading 2-10. It is quite easy to fix without requiring to restyle your document.

  1. Remove Heading 1 from chapter numbering
    Go to Tools>Chapter Numbering, Numbering tab, select level 1 and set Paragraph style to None. Eventually adjust the other levels so that the number for level 1 is never taken into account. In other words, at level n, Show sublevels can be equal to at most n-1.

  2. Redefine Heading 1 sequencing
    In the style side pane, right-click on Heading 1 and Modify. Go to Outline & Numbering tab.
    Reassign Level 1 to Outline level.
    Select Numbering IVX from Numbering style

Your TOC should be built the same.

3 Likes

@ajlittoz I think there was a typo in your instructions. For step #1, Character style was already set to None. I assume you meant Paragraph style. Without doing that, the Outline & Numbering tab contents are all greyed out.

Changing Paragraph style to None and doing the rest of what you said seems to have fixed it. I also had to edit the List Style for Heading 1 to set the separator (under the Customize tab) since I couldn’t do it under Chapter Numbering anymore.

However, I’m having a problem with the template updating correctly, though. For some reason, it’s updating everything correctly except for the Heading 1 setting for Outline level. That stays on Text Body even though the template says Level 1. Changing that manually, however, seems to fix it. I might have to report that as a bug, assuming I can figure out how to replicate it.

There’s also another quirky aspect of this. The separator doesn’t act that same when defining through the Heading 1 style versus the Chapter Numbering feature. I was letting the “PART X” part populate, then hitting Shift-Enter to create a new line while preserving the single-line entry in the table of contents. Since the style is set to center alignment, both the separator and the heading were center aligned. Now, the separator on the first line does not center. See attached image.

I’ve been tweaking the List Style: Numbering IVX under the Position tab. I’ve set the Aligned at to 0, Numbering alignment to Centered, Numbering Followed by to Nothing, Indent at to 0. That comes closer to centering the first line, but I’m pretty sure this is not the way to go about doing this…

Thanks for reporting the typo. Instructions amended.

Also the fact that Heading 1 Outline level doesn’t automatically updates means there is some direct formatting in effect in your document which hides the settings in the template.

To circumvent this, in the document (not in the template), when customising Heading 1, start by pressing Standard button so that all settings revert to their “inherited” values. If Outline level is not the set correctly, you can force it to level 1. But remember, this is an overriding procedure and you may break the template inheritance.

Alignment issue:

This gets fixed by modifying Numbering IVX Position tab. I assume that the base paragraph style (Heading 1) has center alignment.

Set:

  • Aligned at 0cm
  • Numbering alignment Left
  • Number followed by Nothing
  • Indent at 0cm

I get everything centred with these values.

(For those who get notifications on this topic, my last edit only removed typos without changing the answer itself.)

1 Like