Table of contents
daniel.winterstein at gmail.com
Thu Mar 5 04:27:51 EST 2009
I'm using Markdown in an app and would like to provide support for including
a table of contents.
Any suggestions for a syntax? Has anyone done this before?
My first thoughts are:
1. Have a special header item (using markdown extra's header syntax), e.g.
2. Have a special xml tag with optional alternative text inside, e.g.
1. First thingy
2. Second thingy
3. Other stuff
3. Detect that a set of list items matches the first few headers. E.g. if
the document has headers
## Proboscis monkeys
## Other monkeys
## Do Lemur's count?
Then a list that ran:
Would be detected as the start of a contents list, and the other entries
would automatically be added to it. This seems the nicest approach in some
respects, but also the one likely to cause confusion and annoyance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Markdown-Discuss