How to insert a Table of Contents (TOC) in HTML output?

Fab's Avatar


09 Dec, 2014 02:38 PM

Hi, just wondering whether it is possible to include an auto-generated table of contents (TOC) in the HTML output.
I understand that after conversion to LaTeX it is trivial to generate a TOC with a LaTeX compiler. You mentioned that in PDF it is also possible (with some meta data at the beginning, I assume).
However, it is not clear to me how I can have a TOC in the generated HTML output (or whether that is at all possible, as it could require two passes, though the TOC HUD presumably has the information available upon exporting).


  1. Support Staff 1 Posted by Fletcher on 09 Dec, 2014 06:24 PM

    Fletcher's Avatar

    MultiMarkdown does not currently support autogenerating a TOC. LaTeX supports this, but this is not a MMD function.

    You can manually use XSLT to post-process your HTML to add a TOC, but this requires some command-line knowledge (It was part of MMD 2, and I haven't tried it in years):

  2. 2 Posted by Fab on 09 Dec, 2014 06:45 PM

    Fab's Avatar

    Thanks a lot for the quick clarification. I'll go via LaTeX or manual post processing!

  3. Support Staff 3 Posted by Fletcher on 09 Dec, 2014 07:09 PM

    Fletcher's Avatar

    BTW -- google xsltproc for more information about this.

  4. Fletcher closed this discussion on 09 Dec, 2014 07:09 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac