must jupyterbook's TOC renumber chapters after each part?

123 Views Asked by At

As I understand it, when one specifies parts in the _toc.yml file, then renumbering of chapters happens at each part. Is there any way to disable that feature? I'd like for chapter numbering to continue ordinally, using parts as just a benign separator among the chapters.

What I have is:

# Table of content
# Learn more at https://jupyterbook.org/customize/toc.html
#
format: jb-book
root: intro
options:
  numbered: True
chapters:
- file: FOUNDATION
parts:
  - caption: Foundations
    numbered: True
    chapters:
    - file: e_and_m/J-140_Maxwell_3_S0
      sections:
      - file: e_and_m/J-140_Maxwell_3_S1
      - file: e_and_m/J-140_Maxwell_3_S2
      - file: e_and_m/J-140_Maxwell_3_S3
      - file: e_and_m/J-140_Maxwell_3_S9
      - file: e_and_m/J-140_Maxwell_3_S11

  - caption: Relativity
    numbered: True
    chapters:
    - file: relativity/Special Relativity_1_1_VSC
    - file: relativity/Special Relativity_2_1
    - file: relativity/Special Relativity_3_1
    - file: relativity/Special Relativity_4_1

So, J-140_Maxwell_3_S_0 is chapter 1 and Special Relativity_1_1_VSC is also chapter 1.

OR:

I could accomplish the same thing I guess, if I could include new chapters called Foundations.md and Relativity.md but exclude them from numbering. Can I do that as an alternative?

thanks

0

There are 0 best solutions below