jupyter-book: The navbar_number_sections option recently stopped working
Describe the bug
Some change since v0.7.0 broke the _config.yml option navbar_number_sections.
To Reproduce To see the behavior working correctly:
- Create a jupyter book project with a
_config.ymlcontainingnavbar_number_sections: truein thehtml:section. - Put some pages in.
- Build the html using jupyter-book v0.7.0.
- See the nav on the left has correctly numbered the sections.
To see the behavior working incorrectly:
- Same as step 1 above.
- Same as step 2 above.
- Build the html using jupyter-book v0.7.2dev0.
- See the nav on the left has not numbered the sections, ignoring the
_config.ymlsetting.
Expected behavior Always respect the setting in the config file.
My book repo is here: https://github.com/nathancarter/MA346-course-notes
Environment (please complete the following information):
- Python Version 3.7.3
- Output of
jupyter-book --version
Jupyter Book: 0.7.2dev0
MyST-NB: 0.8.1
Sphinx Book Theme: 0.0.23
MyST-Parser: 0.8.1
Jupyter-Cache: 0.2.1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 31 (21 by maintainers)
As this discussion has evolved the way I see
chapter(as it is currently implemented) is effectively as apartequivalent that is organising chapters into groups.The default approach in past
RST/Sphinx I have worked on is fortocto be inferred from the internal heading structure of the text andtoctreetakes in the order of files. Thecaptionis used to provide a heading to a localcontentsortocobject typically. Overloading on caption works forhtmldue to ability to style things withcssso we would need to see if we can intercept these captions forpartsin theLaTeXcontext. Perhaps @AakashGfude and I should setup a number of test cases for varioustocpatterns that people would usually use to see how that aligns with_toc.ymland document in a tabledoc|html|pdfsnippets of the outputs.@AakashGfude we will need to think how to transfer this through to the LaTeX layer. Perhaps theme support?
yay! and thanks for your patience in dealing with this relatively young ecosystem of tools 😃