title: Table of Contents Extension prev_title: Sane Lists Extension prev_url: sane_lists.html next_title: Wikilinks Extension next_url: wikilinks.html Table of Contents ================= Summary ------- Adds a Table of Contents to a Markdown document. This extension is included with the Markdown library since version 2.0. Syntax ------ Place a marker in the document where you would like the table of contents to appear. Then, a nested list of all the headers in the document will replace the marker. The marker defaults to ``[TOC]`` so the following document: [TOC] # Header 1 ## Header 2 would generate the following output: