Difference between revisions of "Template:Horizontal TOC/doc"

From Summertime Saga Wiki
Jump to: navigation, search
m (Usage)
m (Usage)
Line 3: Line 3:
 
== Usage ==
 
== Usage ==
  
<code><nowiki>{{horizontal TOC}}</nowiki></code>
+
: <code><nowiki>{{horizontal TOC}}</nowiki></code>
  
 
There is no need to specify <code><nowiki>__NOTOC__</nowiki></code>: this template handles that automatically.
 
There is no need to specify <code><nowiki>__NOTOC__</nowiki></code>: this template handles that automatically.
Line 9: Line 9:
  
 
To hide the generated heading numbers, use:
 
To hide the generated heading numbers, use:
<code><nowiki>{{horizontal TOC|nonum=yes}}</nowiki></code>
+
: <code><nowiki>{{horizontal TOC|nonum=yes}}</nowiki></code>
*[https://en.wikipedia.org/w/index.php?title=Template:Horizontal_TOC/doc&oldid=653960502 See example]
+
* [https://en.wikipedia.org/w/index.php?title=Template:Horizontal_TOC/doc&oldid=653960502 See example]
  
 
To limit the depth of the generated headings to the first headings only, use:
 
To limit the depth of the generated headings to the first headings only, use:
<code><nowiki>{{horizontal TOC|limit=2}}</nowiki></code>
+
: <code><nowiki>{{horizontal TOC|limit=2}}</nowiki></code>
*[https://en.wikipedia.org/w/index.php?title=Template:Horizontal_TOC/doc&oldid=653960535 See example]
+
* [https://en.wikipedia.org/w/index.php?title=Template:Horizontal_TOC/doc&oldid=653960535 See example]
  
 
To float the table of contents to the center of the page, use:
 
To float the table of contents to the center of the page, use:
<code><nowiki>{{horizontal TOC|align=center}}</nowiki></code>
+
: <code><nowiki>{{horizontal TOC|align=center}}</nowiki></code>
*[https://en.wikipedia.org/w/index.php?title=Template:Horizontal_TOC/doc&oldid=653960585 See example]
+
* [https://en.wikipedia.org/w/index.php?title=Template:Horizontal_TOC/doc&oldid=653960585 See example]
  
 
For example,
 
For example,

Revision as of 23:11, 9 June 2019

This template lays out the table of contents in a horizontal list rather than a vertical one.

Usage

{{horizontal TOC}}

There is no need to specify __NOTOC__: this template handles that automatically.

To hide the generated heading numbers, use:

{{horizontal TOC|nonum=yes}}

To limit the depth of the generated headings to the first headings only, use:

{{horizontal TOC|limit=2}}

To float the table of contents to the center of the page, use:

{{horizontal TOC|align=center}}

For example,

{{horizontal TOC}} produces

See also

Parameter Description Example Type Status
No numbers no num Hide the generated heading numbers yes string optional
Limit limit Limits the depth of subheadings shown. For instance using limit=4 will hide the fourth level and deeper subheadings in the hierarchy. And limit=2 will hide all subheadings leaving only the main headings. This works by hiding the lower levels with CSS number optional
Align align Which side of the page to align the ToC to. Allowed values are left, right, center align=left string optional
Clear clear Align underneath floating images and tables or not. Allowed values are left, right, both, none clear:both string optional