Manually create a table of contents that also works in PDF

Things I have tried

  1. The Obsidian way by using links in the file itself
    After exporting it to PDF it just simply becomes blue coloured text, you can’t click on them.

  2. Using plugins. I have used one by hipstersmoothie, and Aidurber.
    After exporting the file to PDF, the table of contents don’t even appear. But can be used by Obsidian, but not the PDF. Which is not what I want. What I want is a table of contents that can be used in the PDF as well.

  3. By following this stackoverflow post, and various other answer it doesn’t work like I want it to. Take this as an example:


The one in the example that does work is the first one [Test](#TEST), however, the second one doesn’t.

I also tried typing it in literally for qualitative research.

But in preview mode, it just shows up as [Qualitative research](#Qualitative research) literally.

What I’m trying to do

Manually create table of contents that also work after it’s been exported to PDF.


Hopefully this feature need can be escalated as the need is also about being able to create accessible PDFs from Markdown documents made in Obsidian.

In addition to having the ToC display at the top of the markdown document (see @hipstersmoothie’s plugin), we need to be able to export an Obsidian file to PDF and have the table of contents display in the pdf reader’s toolbar. For accessibility (like using a screen readers), having the headings embedded into the PDF document is essential.

The W3C’s Web Content Accessibility Guidelines (WCAG) 2 requirements (success criteria) and techniques is great resource for developers helping to improve accessibility issues.

Regarding PDFs and headings, check out PDF9: Providing headings by marking content with heading tags in PDF documents

The site also provides a test for PDF headings accessibility:

I see, I agree with what you’ve said so far. Perhaps I can send an issue in the Obsidian’s github repo. Your solution for creating headings my marking them is appreciated, but is not what I’m looking for. What I’m looking for is doing everything inside of Obsidian, and using the PDF only as a means to read the content.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.