Non-deterministic Chapter/Section Numbering
See original GitHub issueDescribe the problem
We are hosting the draft of a textbook here at roboticsbook.org. The website is configured using a github action. However, sometimes the build produces chapter and section numbering in one way, and sometimes in another way. We would like it to be consistent so that chapters are numbered 1, 2, 3 etc. and sections are numbered 1.2, 1.3 etc.
I tried adding a jupyter-book clean .
into the workflow book.yml but obviously that did not help, as the action runner starts from a clean slate anyway.
I’m at a loss. Any help would be very welcome, as this issue impedes telling our (400!) enrolled students to look at sections in a consistent way 😕
Link to your repository or website
https://github.com/gtbook/robotics
Steps to reproduce
It is hard to reproduce without cloning the repo, because this happens on a GitHub push event. Every time we push, we don’t know what will happen.
The version of Python you’re using
3.8
Your operating system
Runner on Github is latest ubuntu
Versions of your packages
> jupyter-book --version
Jupyter Book : 0.12.1
External ToC : 0.2.3
MyST-Parser : 0.15.2
MyST-NB : 0.13.1
Sphinx Book Theme : 0.1.9
Jupyter-Cache : 0.4.3
NbClient : 0.5.9
Additional context
Jupyter-book does give warnings related to section numbering:
(gtbook) macbook-pro:robotics dellaert$ jupyter-book build .
Running Jupyter-Book v0.12.1
Source Folder: /Users/dellaert/git/robotics
Config Path: /Users/dellaert/git/robotics/_config.yml
Output Path: /Users/dellaert/git/robotics/_build/html
Running Sphinx v4.3.2
making output directory... done
[etoc] Changing master_doc to 'intro'
[etoc] Excluded 2 extra file(s) not in toc
checking for /Users/dellaert/git/robotics/references.bib in bibtex cache... not found
parsing bibtex file /Users/dellaert/git/robotics/references.bib... parsed 5 entries
myst v0.15.2: MdParserConfig(renderer='sphinx', commonmark_only=False, enable_extensions=['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'], dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', disable_syntax=[], url_schemes=['mailto', 'http', 'https'], heading_anchors=None, heading_slug_func=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'], words_per_minute=200)
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 15 source files that are out of date
updating environment: [new config] 15 added, 0 changed, 0 removed
Executing: S10_introduction in: /Users/dellaert/git/robotics
Executing: S11_intro_state in: /Users/dellaert/git/robotics
Executing: S12_intro_actions in: /Users/dellaert/git/robotics
Executing: S13_intro_sensing in: /Users/dellaert/git/robotics
Executing: S14_intro_perception in: /Users/dellaert/git/robotics
Executing: S15_intro_decision in: /Users/dellaert/git/robotics
Executing: S16_intro_learning in: /Users/dellaert/git/robotics
Executing: S20_sorter_intro in: /Users/dellaert/git/robotics
Executing: S21_sorter_state in: /Users/dellaert/git/robotics
Executing: S22_sorter_actions in: /Users/dellaert/git/robotics
Executing: S23_sorter_sensing in: /Users/dellaert/git/robotics
Executing: S24_sorter_perception in: /Users/dellaert/git/robotics
Executing: S25_sorter_decision_theory in: /Users/dellaert/git/robotics
Executing: S26_sorter_learning in: /Users/dellaert/git/robotics
Executing: intro in: /Users/dellaert/git/robotics
looking for now-outdated files... /Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S11_intro_state is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S12_intro_actions is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S13_intro_sensing is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S14_intro_perception is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S15_intro_decision is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S16_intro_learning is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S21_sorter_state is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S22_sorter_actions is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S23_sorter_sensing is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S24_sorter_perception is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S25_sorter_decision_theory is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S26_sorter_learning is already assigned section numbers (nested numbered toctree?)
none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] intro
generating indices... genindex done
writing additional pages... search done
copying images... [100%] _build/jupyter_execute/S26_sorter_learning_45_0.png
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 12 warnings.
The HTML pages are in _build/html.
[etoc] missing index.html written as redirect to 'intro.html'
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Yeah - the difference is that
options:
will only be applied to the top page, whereasdefaults:
will be applied to every page. Sphinx doesn’t want you to addnumbered:
to each page’stoctree
, only the top page, so that is probably what caused the issuewohoo, thanks!