Difference between revisions of "Help:Table of Contents"

From OutHistory
Jump to navigationJump to search
m (added "help pages" category)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
For each page with more than three headings, a '''table of contents (TOC)''' is automatically generated from the section headings, unless:
 
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 a user) preferences are set to turn it off
* (for an article) the magic word <tt><nowiki>__NOTOC__</nowiki></tt> (with '''two underscores''' on either side of the word) is added in the edit box  
+
* (for an article) the <tt><nowiki>__NOTOC__</nowiki></tt> (with '''two underscores''' on either side of the word) is added in the edit box  
 +
 
  
 
When either <nowiki>__FORCETOC__</nowiki> or <nowiki>__TOC__</nowiki> (with '''two underscores''' on either side of the word) is placed in the wikitext, a TOC is added even if the page has fewer than four headings.
 
When either <nowiki>__FORCETOC__</nowiki> or <nowiki>__TOC__</nowiki> (with '''two underscores''' on either side of the word) is placed in the wikitext, a TOC is added even if the page has fewer than four headings.
  
With <nowiki>__FORCETOC__</nowiki>, the TOC is placed before the first section heading. With <nowiki>__TOC__</nowiki>, it is placed at the same position where this code is placed. This allows any positioning, e.g. on the right or in a table cell. In old versions of MediaWiki, it also allows multiple occurrence, e.g. in every 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.).
 
  
There may be some introductory text before the TOC, known as the "lead". Although usually a heading after the TOC is preferable, <nowiki>__TOC__</nowiki> can be used to avoid being forced to insert a meaningless heading just to position the TOC correctly, i.e., not too low.
+
With <nowiki>__FORCETOC__</nowiki>, the TOC is placed before the first section heading. With <nowiki>__TOC__</nowiki>, it is placed at the same position where this code is placed. This allows any positioning, e.g. on the right or in a table cell.
 +
 
 +
 
 +
There may be some introductory text before the TOC, known as the "lead". Although a heading after the TOC is preferable, <nowiki>__TOC__</nowiki> can be used to avoid being forced to insert a meaningless heading just to position the TOC correctly, i.e., not too low.
 +
 
 +
 
 +
To completely remove the Table of Contents from the page, add <nowiki>__NOTOC__</nowiki> in EDIT mode.
 +
 
  
Using <nowiki>__NOTOC__</nowiki> it is possible to disable the normal Table of Contents. Section links as explained below allow to create '''compact ToCs''', e.g. alphabetical <tt><nowiki>[[#A|A]] [[#B|B]]</nowiki></tt> etc.
+
The Table of Contents can be forced onto a floating table on the right hand of the screen with the following code:
  
The Table of contents can be forced onto a floating table on the right hand of the screen with the code below:
 
 
   <nowiki>&nbsp;{| align="right"
 
   <nowiki>&nbsp;{| align="right"
 
   | __TOC__
 
   | __TOC__
Line 17: Line 23:
  
  
 +
 +
NEED TO BE FIXED - (no explanation of section links yet)
 +
 +
Section links as explained below allow to create '''compact ToCs''', e.g. alphabetical <tt><nowiki>[[#A|A]] [[#B|B]]</nowiki></tt> etc.
  
 
[[Category:Help Pages]]
 
[[Category:Help Pages]]
 +
[[Category:Unfinished]]
 
{{DEFAULTSORT:Table of Contents}}
 
{{DEFAULTSORT:Table of Contents}}

Latest revision as of 12:14, 9 April 2008

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) the __NOTOC__ (with two underscores on either side of the word) is added in the edit box


When either __FORCETOC__ or __TOC__ (with two underscores on either side of the word) is placed in the wikitext, a TOC is added even if the page has fewer than four headings.


With __FORCETOC__, the TOC is placed before the first section heading. With __TOC__, it is placed at the same position where this code is placed. This allows any positioning, e.g. on the right or in a table cell.


There may be some introductory text before the TOC, known as the "lead". Although a heading after the TOC is preferable, __TOC__ can be used to avoid being forced to insert a meaningless heading just to position the TOC correctly, i.e., not too low.


To completely remove the Table of Contents from the page, add __NOTOC__ in EDIT mode.


The Table of Contents can be forced onto a floating table on the right hand of the screen with the following code:

  {| align="right"
  | __TOC__
  |}


NEED TO BE FIXED - (no explanation of section links yet)

Section links as explained below allow to create compact ToCs, e.g. alphabetical [[#A|A]] [[#B|B]] etc.