In Typora’s Markdown, [toc]
is parsed as “Table of Contents”.
So, please enter [toc]
and press the Return
key to create a “Table of Contents” section. The TOC extracts all headings from the document, and its contents are updated automatically as you add to the document.
You can also insert Table of Contents from menubar.
Please notice that different Markdown engine may use different syntax for TOC, and some may not support the [toc]
syntax.
TIP: To know where to put those CSS snippets, please see Add Custom CSS.
In Typora [TOC]
will generate “Table of Contents”. By default it will show headings from h1
to h6
. To hide lower level headings, for instance, h6
, you would append this CSS:
.md-toc-h6 {
display: none;
}
If you want TOC
entities to be displayed auto-numbered, you could try http://pastebin.com/NYugSbXk posted by a Typora user and follows Add Custom CSS to add it.
You can also see “Table of Contents” without inserting [toc]
using Outline function.
When you export the Markdown file to HTML, or PDF, or other built-in export options, table of contents are also exported.