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:

  1. Create a jupyter book project with a _config.yml containing navbar_number_sections: true in the html: section.
  2. Put some pages in.
  3. Build the html using jupyter-book v0.7.0.
  4. See the nav on the left has correctly numbered the sections.

To see the behavior working incorrectly:

  1. Same as step 1 above.
  2. Same as step 2 above.
  3. Build the html using jupyter-book v0.7.2dev0.
  4. See the nav on the left has not numbered the sections, ignoring the _config.yml setting.

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)

Most upvoted comments

As this discussion has evolved the way I see chapter (as it is currently implemented) is effectively as a part equivalent that is organising chapters into groups.

The default approach in past RST/Sphinx I have worked on is for toc to be inferred from the internal heading structure of the text and toctree takes in the order of files. The caption is used to provide a heading to a local contents or toc object typically. Overloading on caption works for html due to ability to style things with css so we would need to see if we can intercept these captions for parts in the LaTeX context. Perhaps @AakashGfude and I should setup a number of test cases for various toc patterns that people would usually use to see how that aligns with _toc.yml and document in a table doc|html|pdf snippets 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 😃