Difference between revisions of "Template:TOC right"
m (cat) |
m (cat) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <div style="clear: {{{clear| | + | <div style="clear: {{{clear|right}}}; margin-bottom: .5em; float: right; padding: .5em 0 .8em 1.4em; background: none; width: {{{width|{{{1|auto}}}}}};" {{#if:{{{limit|}}}|class="toclimit-{{{limit}}}"}}>__TOC__</div><noinclude> |
+ | |||
+ | To use this template use; | ||
+ | |||
+ | '''<nowiki>{{TOC right}}</nowiki>''' | ||
+ | |||
+ | where you want the table of contents to appear (floated right) | ||
+ | |||
+ | To use it with the level of headings shown restricted use | ||
+ | |||
+ | '''<nowiki>{{TOC right|limit=3}}</nowiki>''' | ||
+ | |||
+ | To restrict those shown to h3 and larger, etc. | ||
+ | |||
+ | ---- | ||
+ | Further information about Tables of Contents follows below; | ||
+ | |||
'''Tables of contents''' contain links to sections within an article, providing easy and automatic on-page navigation. | '''Tables of contents''' contain links to sections within an article, providing easy and automatic on-page navigation. | ||
Line 17: | Line 33: | ||
===Changing the alignment of the table of contents=== | ===Changing the alignment of the table of contents=== | ||
− | To force the table of contents to appear on the right of a page, use the <nowiki>{{ | + | To force the table of contents to appear on the right of a page, use the <nowiki>{{TOC right}}</nowiki> template. The table of contents will appear wherever you place the template. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[Category:Template]] | + | [[Category:Formatting Template]] |
</noinclude> | </noinclude> |
Latest revision as of 10:45, 14 May 2019
To use this template use;
{{TOC right}}
where you want the table of contents to appear (floated right)
To use it with the level of headings shown restricted use
{{TOC right|limit=3}}
To restrict those shown to h3 and larger, etc.
Further information about Tables of Contents follows below;
Tables of contents contain links to sections within an article, providing easy and automatic on-page navigation.
Standard Tables of Contents
Articles will include a default table of contents when more than three section headings appear. The default table of contents will include all section headings and will appear just before the first section heading. By default, the table of contents will be left aligned.
You may hide an individual table of contents when viewing an article by clicking the "hide" link in the table. Alternately, if you do not wish to see any tables of contents, you may deactivate their display entirely within the Misc tab of your user preferences. Simply uncheck the box next to "Show table of contents (for pages with more than 3 headings)" and no tables of contents will be displayed.
Modifying the Table of Contents
Several magic words and templates exist which modify the standard tables of contents.
Removing the Table of Contents from an article
To remove the table of contents from any article, simply add the magic word __NOTOC__ anywhere within the article. It's usually not advisable to do so, however.
Forcing and Moving the Table of Contents
To force the table of contents to appear regardless of how many headings an article has, simply add the magic word __TOC__ anywhere within the article. The table of contents will appear wherever you place the template, allowing you to move it up or down the page from its normal position.
Changing the alignment of the table of contents
To force the table of contents to appear on the right of a page, use the {{TOC right}} template. The table of contents will appear wherever you place the template.