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

Add option to TableOfContents to not show leading H1 #1648

Closed
RogerHaase opened this issue Mar 15, 2024 · 3 comments
Closed

Add option to TableOfContents to not show leading H1 #1648

RogerHaase opened this issue Mar 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@RogerHaase
Copy link
Member

Many wiki pages have a single H1 at the top of the page. Add an option to omit the H1 from the TOC.

Maybe:

<<TableOfContents(2,5)>>

to not show any H1 headings, or

<<TableOfContents(-1)>>

to omit only the first H1 from the TOC.

@RogerHaase RogerHaase added the enhancement New feature or request label Mar 15, 2024
@buhtz
Copy link

buhtz commented Mar 15, 2024

Thanks for opening this Issue. The use case was to have a page title. Conceptual a title is not a heading.
So using a h1-heading as page title and ommiting it from the TOC is a workaround and not solution.

Offer a real title (not relevant for TOC) or just offer a big-and-bold-font-formatting.

Or make the <<TableOfContents(-1)>> take care only of that headings appearing after itself and not before it.

= Page title =
Introduction bla bla

<<TableOfContents()>>
= first heading appearing in TOC =
This section appears as "1. first heading appearing in TOC" in the TOC

@RogerHaase
Copy link
Member Author

An easy solution would be a new macro that would look like an H1. Would this suit your needs?

<<PageTitle(My Page Title)>>

@buhtz
Copy link

buhtz commented Mar 16, 2024

<<PageTitle(My Page Title)>>

This would suit my needs.

RogerHaase added a commit that referenced this issue Mar 24, 2024
add PageTitle macro that looks like H1 but not shown in TOC; fixes #1648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants