Template:TOC

From Citizendium
Jump to navigation Jump to search
This documentation is transcluded from Template:TOC/doc (edit | history)

On CZ articles with more than three sections (other than the introductory paragraph), a table of contents will automatically appear just above the first header.

This template allows the table of contents to be inserted at any point on the page, as well as allowing it to be floated to one side rather than pushing the following text below it.

Usage

{{TOC}}
Inserts a standard TOC, but at the current position on the page. Text appearing after this code will be shown below the TOC. More or less equivalent to __TOC__.
{{TOC|right}} or {{TOC|Right}}
Inserts a TOC at the current position on the page and floated to the right of text appearing after this code with a margin and padding. Note, as in nearly everything else on Mediawiki, case matters (at present other case renderings of "right" [e.g., "RIGHT"] will be probably rendered as "none"). This is the default control variable. Other position variables (left, center, auto, none) are not coded in this template and may produce unpredictable results.
{{TOC|left}} or {{TOC|Left}} or {{TOC|LEFT}}
Inserts a TOC at the current position on the page and floated to the left of text appearing after this code with a margin and padding.
{{TOC|none}} or {{TOC|center}}
Any other variable usable with the "float" or "text-align" CSS functions will probably render the TOC as it would without the variable, that is, as if it were coded with a non-attribute {{TOC}} template.

It is not possible to show the TOC more than once on the same page. It will only be shown the first time it is called.

Example

The code {{TOC|right}} is used after the first paragraph below :

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.