From RationalWiki
Jump to navigation Jump to search

If an article contains more than three headings, a Table Of Contents (TOC) will normally be created automatically.

Suppress automatic numbering[edit]

MediaWiki automatically numbers the items in the TOC. To change this behavior, paste the following wherever you want the table to be:

<div class="noautonum">__TOC__</div>

Removing TOC[edit]

The underscores here are doubled: (__), on both sides.

If, for whatever reason, a TOC isn't wanted, it can be removed (switched off) by including when editing: __NOTOC__ (meaning "No table of contents"). It is usually put at the top of the page, although the position in this case hardly makes a difference in the end.

Adding TOC manually[edit]

If __FORCETOC__ is used, then a TOC will occur before the first heading, even if there are three or fewer headings.

Similarly, if __TOC__ is used, then a TOC will occur at the point where __TOC__ is placed even if there are three or fewer headings. Thus, you can place the TOC at any point vertically or horizontally or, for example, in a table cell.

NB: "__TOC__" overrides __NOTOC__".

In a table[edit]

See the main article on this topic: Help:Tables

The TOC can be forced into a floating table on the right hand of the screen with the code below:

{| align="right"
| __TOC__

which produces:

For more information, see Help:Sections.

See also[edit]