Anonymous

List of Dragons: A: Difference between revisions

From All About Dragons
2,742 bytes removed ,  02:41, 18 November 2012
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
[[toc]]
[[toc]]


<noinclude>{{Pp-semi-vandalism|small=yes}}</noinclude>
{{Article creation}}


==Creation and numbering of sections==
==Creation and numbering of sections==
Line 34: Line 36:
When either <code><nowiki>__FORCETOC__</nowiki></code> or <code><nowiki>__TOC__</nowiki></code> (with two underscores on either side of the word) is placed in the wikitext, a TOC is added even if the page has fewer than four headings.
When either <code><nowiki>__FORCETOC__</nowiki></code> or <code><nowiki>__TOC__</nowiki></code> (with two underscores on either side of the word) is placed in the wikitext, a TOC is added even if the page has fewer than four headings.


With <code><nowiki>__FORCETOC__</nowiki></code>, the TOC is placed before the first section heading. With <code><nowiki>__TOC__</nowiki></code>, it is placed at the same position where this code is placed. There may be some introductory text before the TOC, known as the "lead". Although usually a heading after the TOC is preferable, <code><nowiki>__TOC__</nowiki></code> can be used to avoid being forced to insert a meaningless heading just to position the TOC correctly, i.e., not too low.


====Floating the TOC====
====Floating the TOC====
Line 40: Line 41:


# If an article will be adversely affected by the change, don't float the TOC.
# If an article will be adversely affected by the change, don't float the TOC.
# If floating the TOC, it should be placed at the end of the lead section of the text, before the first section heading. Users of [[screen reader]]s do not expect any text between the TOC and the first heading, and having no text above the TOC is confusing. ''See the last line in the information about [[Wikipedia:Manual of Style/Lead section#Elements of the lead|elements of the lead section]].''
# If floating the TOC, it should be placed at the end of the lead section of the text, before the first section heading. Users of [[screen reader]]s do not expect any text between the TOC and the first heading, and having no text above the TOC is  
# When floating a TOC, check whether the page layout will be harmed if the TOC is hidden by the user.
# Long lists may create very long TOCs. The TOC should not be longer than necessary, whether it is floated or not. {{tlx|TOC limit}} can be used to reduce the length of the TOC by hiding nested subsections, rather than a floating TOC.
# The default TOC is placed before the first headline, but after any introductory text (unless changed by the page's editors). If the introductory summary is long enough that a typical user has to scroll down to see the top of the TOC, you may float the TOC so it appears closer to the top of the article. However, the floating TOC should in most cases follow at least the first paragraph of article text.
# Floating a wide TOC will produce a narrow column of readable text for users with low resolutions. If the TOC's width exceeds 30% of the user's visible screen (about twice the size of the Wikipedia navigation bar to the left), then it is not suitable for floating. (Percentages assume a typical user setup.) If text is trapped between a floating TOC and an image, floating can be cancelled at a certain text point, see [[Wikipedia:Picture tutorial#Forcing a break|Forcing a break]].
# If the TOC is placed in the general vicinity of other floated images or boxes, it can be floated as long as the flowing text column does not become narrower than 30% of the average user's visible screen width.
# A left-floated TOC may affect bulleted or numbered lists.
 
[[Template:TOC right]] was proposed for deletion in early July 2005, but there was no consensus on the matter. The archive of the discussion and voting regarding this may be seen at [[Wikipedia:Templates for deletion/TOCright]]. The Manual of Style discussion can be found [[Wikipedia talk:Manual of Style/Archive 17|here]].
 
===Limiting the depth of the TOC===
===Limiting the depth of the TOC===
When an article or project page has a very large number of subsections, it may be appropriate to hide lower-level subsections from the TOC. You can specify a limit for the lowest-level section that should be displayed using {{tlx|TOC limit|<var>n</var>}}, where <code><var>n<var></code> is the number of <code>=</code> signs that are used on each side of the lowest-level section header that should be displayed (e.g. <code>3</code> to show <code><nowiki>===sub-sections===</nowiki></code> but hide <code><nowiki>====sub-sub-sections====</nowiki></code>). The <code>limit=<var>n</var></code> parameter can also be given to {{tlnull|TOC left}} or {{tlnull|TOC right}} the same way.
When an article or project page has a very large number of subsections, it may be appropriate to hide lower-level subsections from the TOC. You can specify a limit for the lowest-level section that should be displayed using {{tlx|TOC limit|<var>n</var>}}, where <code><var>n<var></code> is the number of <code>=</code> signs that are used on each side of the lowest-level section header that should be displayed (e.g. <code>3</code> to show <code><nowiki>===sub-sections===</nowiki></code> but hide <code><nowiki>====sub-sub-sections====</nowiki></code>). The <code>limit=<var>n</var></code> parameter can also be given to {{tlnull|TOC left}} or {{tlnull|TOC right}} the same way.
Line 68: Line 60:
In the HTML code for each section there is "id" attribute holding the section title. This enables [[w:hyperlink|linking]] directly to sections. These section anchors are automatically used by MediaWiki when it generates a table of contents for the page, and therefore when a section heading in the ToC is clicked, it will jump to the section. Also, the section anchors can be manually linked directly to one section within a page.
In the HTML code for each section there is "id" attribute holding the section title. This enables [[w:hyperlink|linking]] directly to sections. These section anchors are automatically used by MediaWiki when it generates a table of contents for the page, and therefore when a section heading in the ToC is clicked, it will jump to the section. Also, the section anchors can be manually linked directly to one section within a page.


The HTML code generated at the beginning of this section, for example, is:
<pre><nowiki>
==<span class="mw-headline" id="Section_linking">Section linking</span>==
</nowiki></pre>
A link to this section ([[Help:Section#Section linking|Section linking]]) looks like this:
:<tt><nowiki>[[Help:Section#Section linking|Section linking]]</nowiki></tt>


To link to a section in the same page you can use <tt><nowiki>[[#section name|displayed text]]</nowiki></tt>, and to link to a section in another page <tt><nowiki>[[page name#section name|displayed text]]</nowiki></tt>.
To link to a section in the same page you can use <tt><nowiki>[[#section name|displayed text]]</nowiki></tt>, and to link to a section in another page <tt><nowiki>[[page name#section name|displayed text]]</nowiki></tt>.