Skip to content

numbering: false on a page suppresses heading display but still increments the chapter counter, causing subsequent chapters to start at 0.x #2907

@seohyonkim

Description

@seohyonkim

Description

When numbering: false is set in a page's frontmatter to exclude it from section numbering (e.g. for front/back-matter pages like a preamble, acknowledgements, or glossary), the page title is correctly not rendered with a number. However, the page still occupies a slot in the chapter counter, causing all subsequent numbered chapters to carry an off-by-N prefix.

The setup for our book is:
myst.yml (simplified):

project:
  numbering:
    title: true
    heading_2: true
    heading_3: true
    heading_4: true
  toc:
    - file: preamble.md          # has numbering: false in frontmatter
    - title: Introduction
      children:
        - file: introduction/prior_art.md
        - file: introduction/scrna_seq.ipynb
    - title: Preprocessing and visualization
      children:
        - file: preprocessing_visualization/quality_control.ipynb
        - file: preprocessing_visualization/normalization.ipynb

preamble.md frontmatter:

---
numbering: false
---

Then they are numbered as 0.1 prior art, 0.2 scrna seq, and so on, instead of e.g., 1. prior art

Proposed solution

Additional notes

This is from using jupyter book 2.1.5, so it should be mystmd 1.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions