Hacker News new | ask | show | jobs
by zulko 2967 days ago
Your PDF will automatically reference the h1, h2, etc, as sections and subsections in your PDF (i.e. you should see them in the sidebar's document tree in PDF viewers that have such a feature). You can also certainly generate a TOC using some javascript framework. For a quick google search I found this:

https://css-tricks.com/automatic-table-of-contents/