Jump to content

Wikipedia:Section: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
="See also" line or section=
no horizonal lines under see alsos
Line 1: Line 1:
[[ja:Wikipedia:節]]

Preferably, articles are divided into '''sections''', using the section header syntax; this is often but not always better than just using bolded text for headers, see below.
Preferably, articles are divided into '''sections''', using the section header syntax; this is often but not always better than just using bolded text for headers, see below.


Line 99: Line 97:
If an article consists of sections and a "see also" refers to the whole article, then make it a separate section. This is to avoid it becoming part of the prior section, to make it visible in the TOC, and to make it easily accessible through the TOC.
If an article consists of sections and a "see also" refers to the whole article, then make it a separate section. This is to avoid it becoming part of the prior section, to make it visible in the TOC, and to make it easily accessible through the TOC.


Alternatively, a "see also" line is sometimes put at the beginning, to link to an article about another meaning of the word, or in the case of a link that many readers are likely to follow instead of reading the article. Do not make this initial "see also" a section. You may want to place a horizontal line underneath before starting the article lead.
Alternatively, a "see also" line is sometimes put at the beginning, to link to an article about another meaning of the word, or in the case of a link that many readers are likely to follow instead of reading the article. Do not make this initial "see also" a section. In such cases, the see also should be italicized and indented. A horizontal line should not be placed under this "see also".


A "see also" belonging to just one section can be put in that section: within a paragraph, as a separate paragraph, or as a subsection.
A "see also" belonging to just one section can be put in that section: within a paragraph, as a separate paragraph, or as a subsection.
Line 106: Line 104:
*[[Wikipedia:Manual of Style (headings)]]
*[[Wikipedia:Manual of Style (headings)]]
*[[Wikipedia:User preferences help]]
*[[Wikipedia:User preferences help]]

[[ja:Wikipedia:節]]

Revision as of 21:53, 16 May 2004

Preferably, articles are divided into sections, using the section header syntax; this is often but not always better than just using bolded text for headers, see below.

Creation of sections

Sections are created by creating their headers as follows (see also Wikipedia:How to edit a page):

==Section==, ===Subsection===, ====Sub-subsection====

Table of contents (TOC)

For each article with more than three headings, a table of contents (TOC) is automatically generated from the section headings, unless:

  • (for a user) preferences are set to turn it off
  • (for an article) in the edit box the code __NOTOC__ is added

The TOC is put before the first section header. Thus there may be some introductory text before it, known as the "lead". See Wikipedia:Lead section for recommendations on the length of that section.

Preferences can be set to number the sections automatically.

Compact TOC

Where you have a large number of very short headings (such as letters of the alphabet) you can get a very long table of contents. An alternative is a compact TOC, which you can achieve by inserting the following text:

{{msg:compactTOC}}

which looks like this:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You can do similar things with years or decades e.g.

1900s - 1910s - 1920s - 1930s - 1940s - 1950s - 1960s - 1970s - 1980s - 1990s - 2000s

Both of the above make use of section linking, see below.

Non-automatic TOC

If the automatic TOC is not suitable, one can specify __NOTOC__ and make one manually. For an example see [1]; it is applied for that page because the page contains examples of headers, which the automatic TOC would take as actual section headers. Later versions of the page removed the need for the manual TOC. (This page uses a different approach: it presents examples of headers as an image).

Failure of a TOC to appear

Apart from __NOTOC__, a TOC will not appear if there is only one section, and sometimes will not appear if there are spaces in early headings:

==Creation of sections==     is more likely to produce a TOC than
== Creation of sections ==

Section linking

You can use section linking to link to a section within the same page (using [[#section name|displayed text]], and if another section with the same name exists a _(sequential number) is appended as in [[#section name_2|displayed text]]), or to a section within another page (using [[page_name#section_name|displayed text]]).

Section linking does not work in a redirect. One can use it anyway in a redirect as a clarification, and at least it works when clicking on the link from the redirect page.

Editing of individual sections

Sections can be separately edited ("section editing feature") by right clicking on the section header (in the case of text before the first section header: on the article header), or on special edit links, depending on the preferences set. This is convenient if the edit is not related to the content in other sections. Inserting a section can be done by editing either the section before or after it, merging with the previous section by deleting the header. Unlike one may assume, an edit conflict may still occur if two users edit different sections at the same time.

When individual section editing does not work

In some situations, you may choose to edit a particular section and discover that the section you are editing (or have already edited) is not the section you chose. This is probably because there is a piece of floating section markup somewhere in the page that does not appear as an actual section. For example, the following text:

===Subsection

Note that this is missing half of the needed markup, so it does not actually create a section, but it can disrupt the section editing feature in MediaWiki. You can correct this problem by removing the extraneous markup.

Editing sections is also usually confused if a section is commented out:

<!-- ==Section I commented out== -->

Remove the sectioning from any commented text -- leave a note where you've removed the section markup if you feel the section will one day be restored.

Also, the section editing feature in most cases does not work when the page is displayed with a table of differences between two versions (changes, cur, dif and last). First press Current revision.

More specifically, in something like

http://www.wikipedia.org/w/wiki.phtml?title=Wikipedia:Village_pump&diff=0&oldid=1215566

(changes from a specified version) it does not work, but in

http://www.wikipedia.org/w/wiki.phtml?title=Wikipedia:Village_pump&diff=0&oldid=0

(last change) it does.

See also Wikipedia:Edit_summary#Section_title_as_automatic_edit_summary.

When right click editing is enabled, you cannot right click a link in a header to open it in a new window, etc. However most browsers have an alternative way of doing that (Mozilla: middle click, ctrl+left click, type ahead find, TAB navigation; IE: shift+left click).

Horizontal dividing line

A horizontal dividing line has a conventional use, as a division demarcation to isolate sections that logically could stand on their own as main sections with a disambiguating category in parentheses: Orion (mythology) and Orion (constellation). Horizontal dividing lines set apart the distinct meanings of a term.

When such sections contain only a few sentences in a single paragraph, this is a good way for readers to find your information. But if your article on a secondary meaning contains more than one paragraph, it may become confusing to the eye.

Note that these lines are not taken into account in the section numbering and TOC. As a result, the explanation of the second meaning of the word is treated as part of the previous section of the text written for the first meaning. To avoid this, use appropriate headers in addition to dividing lines.

See also: wikipedia:disambiguation

"See also" line or section

If an article consists of sections and a "see also" refers to the whole article, then make it a separate section. This is to avoid it becoming part of the prior section, to make it visible in the TOC, and to make it easily accessible through the TOC.

Alternatively, a "see also" line is sometimes put at the beginning, to link to an article about another meaning of the word, or in the case of a link that many readers are likely to follow instead of reading the article. Do not make this initial "see also" a section. In such cases, the see also should be italicized and indented. A horizontal line should not be placed under this "see also".

A "see also" belonging to just one section can be put in that section: within a paragraph, as a separate paragraph, or as a subsection.

See also