0

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

mzjn
  • 48,958
  • 13
  • 128
  • 248
  • According to the docs, what you describe is the default in recent versions of Jupyter-book. I believe you just have to upgrade. – john-hen Jan 02 '22 at 20:05
  • Sorry. "what I describe"...you mean what I see as current behavior or what I describe as what I'd like to have happen? thanks for your reply, BTW – Raymond Brock Jan 02 '22 at 21:53
  • The latter. See [here](https://jupyterbook.org/structure/configure.html#number-your-chapters-and-sections). Quote: "By default, chapter numbering will be continuous between parts (i.e. they will not re-start each section at 1. each time)". I believe this is what you want. Apparently the default behavior changed in version 0.11.2. Current version is 0.12.1. – john-hen Jan 02 '22 at 22:01
  • Thanks. I see that now. a X.X.n update. – Raymond Brock Jan 03 '22 at 14:49
  • I upgraded to the most recent, which is 0.12.1 and indeed, that implements continuous numbering beyond parts. But it broke margin figures! So need to figure that out. thanks, though.... – Chip Brock Jan 03 '22 at 16:14

0 Answers0