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

All headings are shown in PDF TOC #1406

Closed
Tracked by #1533
timobrembeck opened this issue May 10, 2022 · 0 comments · Fixed by #1453
Closed
Tracked by #1533

All headings are shown in PDF TOC #1406

timobrembeck opened this issue May 10, 2022 · 0 comments · Fixed by #1453
Assignees
Labels
‼️ prio: high Needs to be resolved ASAP. 🐛 bug Something isn't working
Milestone

Comments

@timobrembeck
Copy link
Member

Describe the Bug

When PDFs are exported, all headings from <h1> to <h6> are listed in the table of contents.
Instead, we should only list <h1> which originated from real page titles.

Steps to Reproduce

  1. Create page with several sub-headings
  2. Export PDF

Expected Behavior

The table of contents should list all pages in the export - not all sub-headings in all pages.

Actual Behavior

All sub-headings are contained in the TOC as well

Additional Information

I'm not sure whether there is a pretty way to solve this - our library just takes all headings, see docs.
I see two workarounds for this:

  1. Hide the additional levels in the TOC via CSS (preferred)
  2. Convert all headings to generic <div>s during PDF export and style them the way headings normally look
@timobrembeck timobrembeck added 🐛 bug Something isn't working ‼️ prio: high Needs to be resolved ASAP. labels May 10, 2022
@timobrembeck timobrembeck added this to the Version 1.1 milestone May 10, 2022
@MizukiTemma MizukiTemma self-assigned this May 15, 2022
@timobrembeck timobrembeck modified the milestones: Version 1.1, Version 1.2 May 23, 2022
@timobrembeck timobrembeck mentioned this issue Jun 8, 2022
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
‼️ prio: high Needs to be resolved ASAP. 🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants