Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow up to 6 levels of headers in the table of content and optional ignoring of h1 headers #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oliora
Copy link

@oliora oliora commented Oct 23, 2024

Allow up to 6 levels of headers in the table of content and allow to ignore h1 header

Any number of levels is supported but since the official HTML
supports only 6 levels (h1 ... h6) an artifical limitation was added.

This change affects two options: toc_level and ordered_chapter_level.
Both can be set to a value between 0 and 6 (inclusive) where
0 means the feature is disabled.

If either of the options is set to a value greater than 6 then
6 levels of headers are processed and a warning is emitted.

This change also adds option ignore_top_header to exclude h1
headers from the table of content and numbering.

@oliora oliora changed the title Up to 6 levels of headers can be added to the table of contents and n… Up to 6 levels of headers can be added to the table of contents and numbered Oct 23, 2024
@oliora oliora force-pushed the master branch 2 times, most recently from ed46199 to 55d96a0 Compare October 23, 2024 19:58
@oliora oliora changed the title Up to 6 levels of headers can be added to the table of contents and numbered More options for number of levels in the table of content Oct 23, 2024
@oliora oliora force-pushed the master branch 3 times, most recently from 1953719 to 1b38e06 Compare October 24, 2024 21:12
@oliora oliora changed the title More options for number of levels in the table of content Allow up to 6 levels of headers in the table of content and allow to ignore h1 header Oct 24, 2024
…ignoring of h1 headers

Any number of levels is supported but since the official HTML
supports only 6 levels (`h1` ... `h6`) an artifical limitation was added.

This change affects two options: `toc_level` and `ordered_chapter_level`.
Both can be set to a value between 0 and 6 (inclusive) where
0 means the feature is disabled.

If either of the options is set to a value greater than 6 then
6 levels of headers are processed and a warning is emitted.

This change also adds option `ignore_top_header` to exclude h1
headers from the table of content and numbering.
@oliora oliora changed the title Allow up to 6 levels of headers in the table of content and allow to ignore h1 header Allow up to 6 levels of headers in the table of content and optional ignoring of h1 headers Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant