

Visual emphasis on the first-level sections in the table of content by bold print. Here, using an unordered list is possible, but not necessary: the indentation and bullet just add visual clutter and no function here, so we don't use a list for the first ToC level at all.

These would create an indentation, would not link the number, and cannot be used to create decimal classification numbering like "1.1.". In the Table of Contents, these would appear as nested unordered lists on deeper levels. You can add as many levels of chapters and sub-chapters as you need. Inside your document, you would place the target subpart markers like this: ĭepending on where and how you use Markdown, the following should also work, and provides nicer-looking Markdown code: # 1.1. We came up with the following: Code # Content What I was missing is, however, a visually attractive formatting for a table of contents, using the limited options that Markdown provides. Most are open source software and can be adapted to your needs. Downloads and documentsĪs mentioned in other answers, there are multiple ways to generate a table of contents automatically. If you want do it manually, just use :UpdateToc command. Generally you don't need to do this, existing table of contents will auto update on save by default.

Update existing table of contents manually You can view here to know differences between GFM and Redcarpet style toc links. This command is suitable for Jekyll or anywhere else use Redcarpet as its Markdown parser. Generate table of contents in Redcarpet link style. This command is suitable for Markdown files in GitHub repositories, like README.md, and Markdown files for GitBook. Generate table of contents in GFM link style. The command will generate headings after the cursor into table of contents. Move the cursor to the line you want to append table of contents, then type a command below suit you. Generate table of contents for Markdown files.Īuto update existing table of contents on save. If you are working with Markdown parsers GFM (GitHub Flavored Markdown) or Redcarpet, I wrote a Vim plugin to handle table of contents. This is a sub paragraph, formatted in heading 3 style Another paragraphĪnchor tags generated by different Markdown parsers are not even. Some introduction text, formatted in heading 2 style Some paragraph This is a sub paragraph, formatted in heading 3 style Some introduction text, formatted in heading 2 style

