Template:TOC/doc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Caesar Schinas
(New page: <!-- Do not remove this line. Replace the instructions below with the correct documentation. --> A table of contents will automatically appear on CZ articles above the first header, when t...)
 
imported>Caesar Schinas
No edit summary
Line 1: Line 1:
<!-- Do not remove this line. Replace the instructions below with the correct documentation. -->
<!-- Do not remove this line. Replace the instructions below with the correct documentation. -->
A table of contents will automatically appear on CZ articles above the first header, when there are more than three headers on the page.<br />
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.
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.



Revision as of 12:24, 9 May 2009

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|left}}
Inserts a TOC at the current position on the page and floated to the left of text appearing after this code.
{{TOC|right}}
Inserts a TOC at the current position on the page and floated to the right of text appearing after this code.

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.