GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing en.wikipedia.org — Help:Section - Wikipedia (Redirected from Help:TRANSSECTION)
A page can and should be divided into sections, using the section heading syntax. A table of contents (ToC) is automatically generated for pages and talk pages that are using section headers.[a] This page explains the syntax of these elements. For information about how to name sections or how to use sections to structure articles, please read the Guide to layout. Creation of sectionsFor details on how to name or order sections, or about using them to structure articles, see Wikipedia:Manual of Style/Layout.
Sections are created by creating their headings, as below. == Section == === Subsection === ==== Sub-subsection ==== These are sometimes called "levels" based on the number of equal signs before and after, so that the top "Section" above with two equal signs is a "level two" heading, the subsection is a "level three" heading, and the "sub-subsection" is "level four". The maximum level number is six. Please do not use a "level one" heading (only one equals sign on each side, i.e.: =Heading=). This would cause a section heading as large as the page title at the top of the page. Heading names of sections (including subsections) should be unique on a page. Using the same heading more than once on a page causes problems:
Visual EditorWhen using the Visual Editor, starting a line with equal signs still work as a way to create a section heading. On mobile, this is even the only way one can create sections. On Desktop, you can alternatively insert new headings by using a dropdown menu (see image). Finally, there are shortcuts in the Visual Editor: Ctrl+2 gives you a level-2 heading, Ctrl+3 a level-3 heading, etc. Table of contents (TOC)"WP:TOC" redirects here. For Wikipedia's contents, see Wikipedia:Contents.
A table of contents (TOC) sidebar lists the section headings of a page, unless the magic word Legacy behaviorsThe TOC on the sidebar of a page may still be disabled by certain TOC templates, such as {{Compact TOC}}. To hide the TOC on legacy skins but allow it to be displayed on the sidebar in the default Vector 2022 skin, replace
Section linkingIn the HTML code for each section there is an "id" attribute holding the section title. This enables 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: <span class="mw-headline" id="Section_linking">Section linking</span> A link to this section (Section linking) looks like this: [[Help:Section#Section linking|Section linking]] (NB section links are case sensitive, including the first character (Help:Link).) To link to a section in the same page you can use The anchors disregard the depth of the section; a link to a subsection or sub-subsection etc. will be An underscore and number are appended to duplicate section names. E.g. for three sections named "Example", the names (for section linking) will be "Example", "Example_2" and "Example_3". However, after editing section "Example_2" or "Example_3" (see below), one, confusingly, arrives at section "Example" from the edit summary. If a section has a blank space as heading, it results in a link in the TOC that does not work. For a similar effect see NS:0. To create an anchor target without a section heading, you can use the {{anchor}} template or a span: To format a link to a section with a section sign ("§") rather than with "#" or custom text, use {{Section link}} (or {{slink}}). For example, Notes:
For linking to an arbitrary position in a page see WP:ANCHOR. Section linking and redirectsA link that specifies a section of a redirect page corresponds to a link to that section of the target of the redirect. A redirect to a section of a page will also work, try e.g. the redirect page Section linking and redirects. A complication is that, unlike renaming a page, renaming a section does not create any redirect from the old section name. Therefore, incoming links to the old section name will have to be fixed. This problem can be fixed by adding a manual anchor link to the old name, using the Anchor template. However, if you do not want to retain links to the old names, you will need to track them down and fix them. There is no separate What links here feature for sections: the list contains links to the entire page, as well as links to all sections (and anchors) therein. The following possible workarounds will help "future proof" incoming links you make to a section, but they will not help with tracking down simple links to sections during a rename:
Redirect pages can be categorized by adding a category tag after the redirect command. In the case that the target of the redirect is a section, this has, to some extent, the effect of categorizing the section: through the redirect, the category page links to the section; however, unless an explicit link is present, the section does not link to the category. On the category page, redirects are displayed with class redirect-in-category, so they can be shown in e.g. italics; this can be defined in MediaWiki:Common.css. See also WP:Categorizing redirects. Section editingSections can be separately edited by clicking special edit links labeled "[edit]" by the heading. Inserting a section can be done by editing either the section before or after it. An editor can merge one section with the previous section by deleting the heading. Adding a section at the end"WP:+" redirects here. For information about good articles, which are marked with small green plus signs (
For linking to a section from an edit summary, see Help:Edit summary § Section editing.
Navigation on pages from "talk" namespaces provides a special link labeled "New section", "+", or "Add topic" used to create a new section to the end of the page.[b] The link can be removed from a page with the magic word The URL for such an action looks like: https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit§ion=new. In this case, a text box having as title "Subject:", will appear and the content you type in it will become the name of the new section heading. There is no input box for the edit summary; it is automatically created. Editing before the first sectionBy default, there is no link to edit the lead section of a page, so the entire page must be edited. Lead section editing can be enabled through Preferences → Gadgets → Appearance → Removing section edit linksSection edit links can be removed, for example in archives, with the magic word PreviewThe preview in section editing does not always show the same as the corresponding part of the full page, e.g., if on the full page an image in the previous section intrudes into the section concerned. Also, <ref>s usually become hidden; see #Editing a footnote for a solution. The edit page shows the list of templates used on the whole page, i.e., also the templates used in other sections. Editing a footnoteTo edit a footnote rendered in a section containing the code <references />, edit the section with the footnote mark referring to it (see Help:Footnotes). Previewing the section will show a preview of the footnote. Sections within parser functions
When conditionally (using a parser function) transcluding a template with sections, the "edit" links of this and subsequent sections will edit the wrong section or give the error message that the section does not exist (although the page (including TOC) is correctly displayed and the TOC links correctly). This is because for the targets of the "edit" links the content of conditionally included templates is considered part of the page itself, and the sections are counted after expansion. Editing sections of included templates
The editing facilities can also be applied to a section of an included template. This section, Help:Editing sections of included templates, is an example. For the purpose of section editing the extent of a section is governed by the headers in the calling page itself. It may consist of a part before the template tag, the template tag, and a part after the template tag, even if the template has sections.It tends to be confusing if the extent of sections according to the system is different from what the rendered page suggests. To avoid this:
It may be convenient, where suitable, to start a template with a section header, even if normally the contents of the template would not need a division into sections, and thus the template is only one section. The edit facilities for editing sections can then be used for editing the template from a page that includes it, without specially putting an edit link. This template is an example, it does not need a division into sections, but has a header at the top. One downside with this solution is that you can't change the section level in the page that includes the template. This means that the section level you use in the template will be the same that is displayed on all your pages where you include the template, despite the fact that this might conflict with your intended hierarchy on the different pages. Note that a parameter value appearing in a template, for example "{{{1}}}", is, if we want to preserve the parameter, not edited by editing the template but by editing the template call, even though the rendered page and its edit links do not automatically show that. Some explanatory text and/or an extra edit link can be useful. In this case, to edit "{{{1}}}" we have to edit the template tag on the page calling the template. If we use section editing the relevant section edit link is that at the header appearing before the header in the template itself. The __NOEDITSECTION__ tag in any template affects both that template, the pages it's included on, and any other templates included on the same page. {{fake heading}} can be used in templates and help pages where the appearance of a heading is desired without showing in the table of contents and without an edit link. Sections vs. separate pages vs. transclusionAdvantages of separate pages:
Advantages of one combined page with sections:
An alternative is composing a page of other pages using the template feature (creating a compound document by transclusion). This allows easy searching within the combined rendered page, but not in the combined wikitext. As a disadvantage, a title for each page has to be provided. For the pre-expand include size limit, this is disadvantageous even compared with one large page: the pre-expand include size is the sum of the pre-expand include sizes of the components plus the sum of sizes of the wikitexts of the components. Section transclusionLabeled section transclusionMain page: Help:Labeled section transclusion
Template-style section transclusionTemplate-style section transclusion (TST) is an older method of transcluding sections. Section markingMark off sections in the text using this markup: <onlyinclude>{{#ifeq:{{{transcludesection|}}}|chapter1| content }}</onlyinclude> Section transclusionAfter labeling the respective (sub-)section, you may use a template call to transclude the section. For example, to transclude a section called {{:pageX|transcludesection=chapter1}}
The target page defines the location of the section. Image placementMain page: MOS:SECTIONLOC
Sections for demo aboveDemo http://example.comThis section is linked to from #Section linking. See also
Manual of style Footnotes
| |||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |