question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No numbering when using parts

See original GitHub issue

Describe the bug

context When I do split my TOC into parts, the previously working numbering is gone.

expectation I expected numbering to continue to exist after splitting TOC into parts.

bug But instead all numbering is gone, despite still having the numbering setting set.

Reproduce the bug

TOC that works for numbering:

format: jb-book
root: intro
options:
  numbered: true
chapters:
  - file: 01_uvis_on_pds
  - file: 02_pds_data_structure
  - file: 03_calibration
  - file: bibliography
  - file: Appendix1_Flatfielding
  - file: Appendix2

TOC that doesn’t work:

format: jb-book
root: intro
options:
  numbered: true
parts:
  - caption: Part 1
    chapters:
      - file: 01_uvis_on_pds
      - file: 02_pds_data_structure
      - file: 03_calibration
      - file: bibliography
  - caption: Part 2
    chapters:
      - file: Appendix1_Flatfielding
      - file: Appendix2

List your environment

GH workflow install via requirements

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.10 Jupyter-Cache : 0.4.3 NbClient : 0.5.10

  • Python 3.8
  • OS:
    • Ubuntu
    • 20.04.3
    • LTS

GH workflow:

jobs:
  build-and-deploy-book:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        python-version: [3.8]
    steps:
    - uses: actions/checkout@v2

    # Install dependencies
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        pip install -r requirements.txt
        jupyter-book --version

    # Build the book
    - name: Build the book
      run: |
        jupyter-book build .

    # Deploy the book's HTML to gh-pages branch
    - name: GitHub Pages action
      uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: _build/html

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
choldgrafcommented, Feb 22, 2022

@michaelaye I don’t believe it’s currently possible, there’s an issue about this over in the Sphinx repo here: https://github.com/sphinx-doc/sphinx/issues/6614

1reaction
choldgrafcommented, Feb 22, 2022

Hmm - I was able to reproduce the same error as well. However, manually putting numbered: true underneath each caption entry works, so try that as a stopgap fix:

format: jb-book
root: intro
parts:
  - caption: Part 1
    numbered: true
    chapters:
      - file: 01_uvis_on_pds
      - file: 02_pds_data_structure
      - file: 03_calibration
      - file: bibliography
  - caption: Part 2
    numbered: true
    chapters:
      - file: Appendix1_Flatfielding
      - file: Appendix2
Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with \part (Numbering, partend
Restart Numbering whenever a new part starts (So Sol1 is numbered as #1 and not #3); Remove numbering from the closingword and make...
Read more >
How do I remove the numbers from section headings?
If you'd prefer your sections, subsection, and so forth to be displayed without numbers on the left side of the title, you simply...
Read more >
Part numbering system best practice
PLM software can easily generate the next part number in sequence, prevent conflicts with previously-issued part numbers, and find parts based on the...
Read more >
Using Internal Part Numbers: The Why and the How
There is no industry standard for part numbering ; your numbering system can be literally anything you wish. You can start with number...
Read more >
Automatic Numbering - Microsoft Word for Dissertations
Click one of your headings, then go back to the Home Ribbon, and in the Paragraph Group click the Multilevel List icon (see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found