Difference between revisions of "Table of Contents - Mediawiki"
(New page: A page can be divided into '''sections''', using the section header syntax. ==Creation and numbering of sections== '''Sections''' are created by creating their headers, as below <pre> =...) |
m |
||
Line 38: | Line 38: | ||
More info: http://meta.wikimedia.org/wiki/Help:TOC | More info: http://meta.wikimedia.org/wiki/Help:TOC | ||
− | + | {{Mediawiki Help}} | |
[[category:Mediawiki]] | [[category:Mediawiki]] |
Revision as of 14:11, 15 April 2013
A page can be divided into sections, using the section header syntax.
Contents
Creation and numbering of sections
Sections are created by creating their headers, as below
==Section== ===Subsection=== ====Sub-subsection====
Please do not use only one equals sign on a side (=text here=); this causes a title the size of the page name, which is taken care of automatically.
With the preference setting Auto-number headings sections are numbered.
Table of contents (TOC)
For each page with more than three headings, a table of contents (TOC) is automatically generated from the section headings, unless:
- (for a user) preferences are set to turn it off
- (for an article) in the edit box the magic word __NOTOC__ is added
Controlling the Auto TOC
With __FORCETOC__ or __TOC__ in the wikitext a TOC is added even if the page has fewer than four headings.
With __FORCETOC__ the TOC is put before the first section header. With __TOC__, it is put at the position of this code. This allows any positioning, also e.g. on the right, and in a table cell, and it also allows multiple occurrence, e.g. in every section (demonstrated on Section; however, this seems only useful if the sections are long, so that the TOCs take up only a small part of the total space.).
Thus there may be some introductory text before the TOC, known as the "lead". Although usually a header after the TOC is preferable, __TOC__ can be used to avoid being forced to insert a meaningless header just to position the TOC correctly, i.e., not too low.
User preferences can be set to number the sections automatically.
The Table of contents can be forced onto a floating table on the right hand of the screen with the code below
{|align=right |__TOC__ |}
More info: http://meta.wikimedia.org/wiki/Help:TOC
Mediawiki Help
- Mediawiki Tutorial - for a step-by-step tutorial to get you started
- FAQs - common questions about using Mediawiki at Evergreen
- All Mediawiki articles