-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Feature Request
Description:
When reorganizing a book (moving, adding, or removing chapters), chapter numbers in titles need to be manually updated. This is error-prone and tedious.
Requested Feature:
Add a tool or option to automatically renumber chapters based on their position in SUMMARY.md. Options could include:
- A new MCP tool
renumber_chaptersthat updates chapter title prefixes based on position - An option in
update_tocto also update chapter number prefixes in titles - A
chapter_numberingconfig option in book.toml that controls numbering format (e.g., "1.", "Chapter 1:", "1.1", etc.)
Use Case:
When writing a book, chapters frequently get reorganized. Currently, if I move Chapter 5 to position 3, I need to manually update:
- The title in SUMMARY.md
- The H1 heading in the chapter file
- Any cross-references to that chapter
Suggested Implementation:
- Parse SUMMARY.md for chapter order
- Update H1 headings in chapter files to match position
- Support configurable number formats (numeric, roman numerals, etc.)
- Optionally update cross-references
Related:
- Core mdbook doesn't support this either
- Third-party preprocessors exist (mdbook-numbering, mdbook-chapter-number) but require separate installation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels