Jump to content

Template:TOCfloat: Difference between revisions

forgot to update end of doc
(apparently we need to do it like this)
(forgot to update end of doc)
Line 9: Line 9:
*"width" — e.g., "300px" or "30%"; this works in unusual ways: you can make the TOC more narrow than it would be normally (forcing line wrap on header names that exceed that width), but if you supply a width that is greater than the "auto" width (determined by the length of the longest header name), then the TOC stays at the "auto" width, but with a whitespace margin added to the right. When you use the template's default float:left style, this margin appears between the left-aligned TOC and the article text that wraps around it, which one could use to insert a small bit of extra space for aesthetic purposes. When you supply "side=right", however, excess width is still placed to the right of the TOC, making an undesirable white area as a sort of third column after the wrapped article text and the TOC.
*"width" — e.g., "300px" or "30%"; this works in unusual ways: you can make the TOC more narrow than it would be normally (forcing line wrap on header names that exceed that width), but if you supply a width that is greater than the "auto" width (determined by the length of the longest header name), then the TOC stays at the "auto" width, but with a whitespace margin added to the right. When you use the template's default float:left style, this margin appears between the left-aligned TOC and the article text that wraps around it, which one could use to insert a small bit of extra space for aesthetic purposes. When you supply "side=right", however, excess width is still placed to the right of the TOC, making an undesirable white area as a sort of third column after the wrapped article text and the TOC.
*"limit" — limits the TOC to a certain level of hierarchy; for instance, <tt><nowiki>{{TOCfloat|limit=2}}</nowiki></tt> would only show level 2 headers (==), keeping the table short.
*"limit" — limits the TOC to a certain level of hierarchy; for instance, <tt><nowiki>{{TOCfloat|limit=2}}</nowiki></tt> would only show level 2 headers (==), keeping the table short.
*"nonum" — removes automatic numbering from the TOC; this is preferable visually when the article section names themselves already start with numbers.
*"numbers=no" — removes automatic numbering from the TOC; this is preferable visually when the article section names themselves already start with numbers.


[[Category:Basic formatting templates]]
[[Category:Basic formatting templates]]
</noinclude>
</noinclude>