Making a table of contents in your wiki page
First, a quick reminder of the code for making headings.
- == Heading ==
- Big heading [Same as an HTML H2]
- === Subheading ===
- A subheading, 'nests' inside big headings [Same as an HTML H3]
[H4 doesn't look any different from H3 in the default template. If we find we need another level of headings, I'll change it!]
Insert: <toc> where you want the table of contents. Twine standard is to put the TOC after the introductory paragraph, which should start with the title of the page in bold.
Now the headings.
Headings have to be numbered (I show how to do that below) for the TOC to pick them up. That means if you add an un-numbered heading, it won't be indexed. Try not to do that, but in some circumstances it may make sense to have an unindexed heading come last on the page.
Typical page:
'''
Title''' is an introductory paragraph which should provide a basic summary for people who just want the gist.
=== Contents ===
(this title's optional!) <toc>
== # top-level heading ==
Text
=== # subheading ===
Text
=== # another subheading ===
Text
== unnumbered heading isn't indexed ==
Text
== # another heading ==
Text.
And here's an example of what that might look like. Obviously, don't use a TOC if the page isn't long enough to justify one. It's easy enough to go back and add one if you expand the page later.