Help:Section
From ClickToNews
| ClickToNews.com | Latest Articles | Post New Headline | Help | News Directory | News Categories |
A page can be divided into sections, using the section header syntax.
Contents |
[edit] Creation and numbering of sections
Sections are created by creating their headers, as below:
==Section== ===Subsection=== ====Sub-subsection====
Please do not use only one equals sign on a side (=text here=); this causes a title the size of the page name, which is taken care of automatically.
With the preference setting Auto-number headings sections are numbered.
[edit] Table of contents (TOC)
For each page 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 magic word __NOTOC__ is added
With __FORCETOC__ or __TOC__ in the wikitext a TOC is added even if the page has fewer than four headings.
With __FORCETOC__ the TOC is put before the first section header. With __TOC__, it is put at the position of this code. This allows any positioning, also e.g. on the right, and in a table cell, and it also allows multiple occurrence, e.g. in every section (demonstrated on m:Help talk:Section; however, this seems only useful if the sections are long, so that the TOCs take up only a small part of the total space.).
Thus there may be some introductory text before the TOC, known as the "lead". Although usually a header after the TOC is preferable, __TOC__ can be used to avoid being forced to insert a meaningless header just to position the TOC correctly, i.e., not too low.
Preferences can be set to number the sections automatically.
In a page calling a template with sections, the sections in the template are numbered according to their position in the rendered page, e.g. if the template tag is in the third section, then the first section of the template is numbered four. Any text in the template before its first section shows up as part of the section with the template tag, and any text after the tag before a new header shows up as part of the last section of the template. This may be done deliberately, but can usually better be avoided (see also below).
Using __NOTOC__ it's possible to disable the normal Table of Contents. Section links as explained below allow to create compact ToCs, e.g. alphabetical [[#A|A]] [[#B|B]] etc.
[edit] Section linking
In the HTML code for each section there is an anchor element HTML element "a" with both "name" and "id" attributes 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, but you can also use them to manually link directly to one section within a page.
The html code generated at the beginning of this section, for example, is:
<p><a name="Section_linking" id="Section_linking"></a></p> <h2>Section linking</h2>
A link to this section (Section Linking) looks like this:
[[Help:Section#Section_linking|Section Linking]]
To link to a section in the same page you can use [[#id|link_label]], and to link to a section in another page [[page_name#id|link_label]].
To create an anchor target without a section header, you can use a span, for example:
<span id="anchor_name"></span>, however this won't work with some very old browsers.
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".
Note that using the date formatting feature in section headers complicates section linking.
An internal link in a section header does not give complications:
- #Demo_a
- Help:Section#Demo_http:.2F.2Fa
- http://meta.wikimedia.org/wiki/Help:Section#Demo_http:.2F.2Fa
For linking to an arbitrary position in a page see linking to a page.
[edit] Section linking and redirects
A 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 goes to the top of the page. One can use it anyway as a clarification, and at least it works when clicking on the link from the redirect page.
A complication is that, unlike renaming a page, renaming a section does not create some kind of redirect. Also there is no separate what links here feature for sections, pages linking to the section are included in the list of pages linking to the page. Possible workarounds:
- put an anchor and link to that
- put a comment in the wikitext at the start of a section listing pages that link to the section
- make the section a separate page/template and either transclude it into, or just link to it from, its parent page; instead of linking to the section one can then link to the separate page.
[edit] Section links
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]]).
For example to link the table of contents entry: [[#test|test]]
Type: ===test=== where you want the user to jump to.
When a user presses "test" in the table of contents, they will automatically jump to the ===test=== entry below in the text.
If a (sub)section has a blank space as header, it results in a link in the TOC that does not work. For a similar effect see NS:0.
[edit] Section editing
Sections can be separately edited ("section editing feature") by right clicking on the section header and/or special edit links, depending on the preferences set, and by a url like
http://meta.wikimedia.org/w/wiki.phtml?title=Help:Section&action=edit§ion=2
(Note that here section numbers are used, not section titles; subsections have a single number, e.g. section 2.1 may be numbered 3, section 3 is then numbered 4, etc.)
This is convenient if the edit does not involve other sections and one needs not have the text of other sections at hand during the edit (or if one needs it, open the section edit link in a new window, or during section editing, open "Cancel" in a window). Section editing alleviates some problems of large pages.
"__NOEDITSECTION__" anywhere on the page will remove the edit links. It will not disable section editing itself, right clicking on the section header and the url still work.
Inserting a section can be done by editing either the section before or after it, merging with the previous section by deleting the header.
Adding a section at the end can also be done with a URL like http://meta.wikimedia.org/w/wiki.phtml?title=Meta:Sandbox&action=edit§ion=new . On talk pages a link is provided for this. The section header is the same as the edit summary, and typed only once.
[edit] Preview
The 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.
The edit page shows the list of templates used on the whole page, i.e. also the templates used in other sections.
[edit] Subsections
Subsections are included in the part of the page that is edited. Whether there is automatic section numbering is determined by the number of sections concerned, i.e. one plus the number of sub- and subsub-sections, etc. Section numbering is relative to the part that is edited, so on the relative top level there is always just number 1, relative subsections all have numbers starting with 1: 1.1., 1.2, etc.; e.g., when editing section 3.2, section 3.2.4 is numbered 1.4. However, the header format is according to the absolute level.
[edit] Editing before the first Section
There is no link for editing the part before the first heading, except by the work-around of right-clicking on the page header; but the URL works, for example for this page:
http://meta.wikimedia.org/w/wiki.phtml?title=Help:Section&action=edit§ion=0
A less cumbersome way to obtain this link is to use any section edit link of the page, and change the number of the section to zero. Javascript can also create this URL, see w:en:Wikipedia:WikiProject User scripts/Scripts/Edit Top.
See also Help:Section editing demo.
[edit] Editing a page with large sections
If a page has very large sections, or is very large and has no division into sections, and one's browser or connection does not allow editing of such a large section, then one can still:
- append a section by specifying a large section number (too large does not matter); however, one has to start with a blank line before the new section header
- append content to the last section by not starting with a blank line; however, with the limitations of one's browser or connection, one cannot revert this, or edit one's new text.
If one can view the wikitext of a large section, one can divide the page into smaller sections by step by step appending one, and finally deleting the original content (this can be done one large section at a time). Thus temporarily there is partial duplication of the content, so it is useful to put an explanation in the edit summary.
[edit] Providing for a separate edit history for a section
Without changing the appearance of a page, a section of it can be an included separate page, see composite pages. This way a separate edit history is provided for the section. Also this allows watching it separately.
Help:Editing sections of included templates
[edit] "See also" line or section
If a page consists of sections and a "see also" refers to the whole page, 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.
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.
[edit] Sections vs. separate pages vs. transclusion
Advantages of separate pages:
- what links here feature
- separate edit histories
- automatic redirect on renaming
- redirect to a section is not possible
- loading a small page is faster than loading a large page
- can separately be put in categories
- with Semantic MediaWiki: have separate annotations
Advantages of one large page with sections:
- loading one large page is faster and more convenient than loading several small ones
- searching within one large page (the page itself or the wikitext) with a local search function is faster and in some respects better than searching several pages (for which one has to search the whole project); also the TOC provides for convenient navigation.
- enforces the cohesion of a concept that while having several definitions needs independent editing.
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. Titles have to be provided.
[edit] Subdivisions in general
- Sections of a page are adjacent, and the end of the last section coincides with the end of the page, i.e., all the text within the page is in a section other than a possible part before the first section.
- The same applies at lower levels, i.e. in sections and subsections.
- In a list in a section, each list item is a kind of subsection; however, lists need not be adjacent, i.e., between lists there may be content at the section level, after which the list items of the following list are content which is down again to list item level.
- In HTML, a list item may contain several sublists, not necessarily adjacent; thus there may be parts of the list not only before the first sublist, but also between sublists, and after the last one; however, in wiki-syntax-lists, sublists follow the same rules as sections (see the first item in this list): the only possible part of the list not in sublists is before the first sublist.
See also continuing a list item after a sub-item and soviet union cold war pretty guardian sailor moon video berliner liebe cheapest car insurance companies demande de visa uk au maroc domain links mike schneider associated press sara evans suds video resturants london a mortgage broker license axialis iconworkshop 5.0 crack vintage electronic packaging peter russell comedy video advanced office password recovery 3.02 serial key pooped pantie video all video to vcd svcd dvd converter key lime pie recipes sm appliance philippine evening herald classifieds lose to google microsoft game thing friends real ringtones motorola v220 2005 senatu wybory acquisition serial mac satx road runner top sanibel sea song spanish fly legally buy norco without a prescription slim fast medical demonstrative evidence six million dollar man ringtone pipe mitre yolanda adams cleveland indians you make me wanna song lyrics link sysworxx wellbutrin side effects stomach asp split string domain morgage lenders writing business proposals diesel instructor jobs in atlanta do gynexin really work labsystems uk inspiration for life moto illimite list of apartment buildings in new york movie branford ct osco pharmacy locations free keypad ringtones nokia red rocket south park video small computer fans url str8 shot free mobile ringtone t voice buy it now sunset boulevard movie reviews easy gourmet recipes school district 281 minnesota mixw crack webmap too many times i can hear you laughing kissing with cum in mouth chumbawumba pamela picture rogers video untitled how could this happen to me video card emachines t2984 feverfew wedding favor ideas online term life quotes classical music downloads kid id bracelet maryland department of motor vehicles isaac mizrahi shoes movie about the scope monkey trial index shockwave video janesville rolex replicas car insurance learner over 25 offline explorer enterprise 4.xx aldi jobs jobs in derby runch case prefabbricate movie phantasm tab u2 vertigo microsoft end user license artificial grapes sepultura map sitemap advent rising no cd crack credit onebank home link estate agents links master of the monster lair wiki free teen blow job video pollution video water current interest rates for home loans in california jarlsburg pirate of the caribbean toy mariah carey new video ionamin loss weight information online 206 car naza metadate drug movie below zero photoshop crack code sitemap philosophical movie quotes questions asked at job interview annuity sales exterior cedar board and batten plywood siding work 25 km around balaklava kid definition what is metal margaret fuller case activation code earth google plus ej banks become a model papercut video riviera hotel las vegas extrait video anneliese van der pol movie rare vhs westerns look into my eyes lyrics by benzino dioses del metal case study, environmental management plan pure teen movies how much will one collection affect my credit upmc job application adobe photoshop elements 2.0 crack jobs in huntsville jobs boston area credit card merchant airline travel price thyroid problem top free go phone ringtone kilometers into miles per hour martin luther king dream video speech movie theater newburgh new york excel worksheet protection crack photo contests wwf diva thongs sienna miller topless idesignerserializationmanager top vera wand dress red-green color blindness mike roper refinancing home mortgage calculator usa company owner visa austin country inns online visa application for uk littlegreenfootballs loews movie theaters nj inspiration new song us bank retirement funds morehead university quotes from disney movies t5 lighting replacing 400w metal halide pacers piston brawl video sitemap cherry bomb bike girls wholesale suppliers jacksonville florida times union adware spy serial crack anarchist cookbook torrent stainless steel manufacturer commercial real estate investing in canada page potomac job corp center romance novels online pop rocks and coke video womens footwear activation key windows 2000 wiener stadtfest free patterns primal fear movie cast see movies online for free attack break movie shark spring juegos infantiles on line iso image creator free download warwick school district license pennsylvania professional harry potter fanfics live meeting video eyes god movie their watching were pvr 150 personal video recorder hindi funny birthday wishese cards http airline travel discounts airline tickets purchase alaska airline miles new account asian bang gang video http singer yummy jim bowie life in a time line spysweeper serial crack piano performance videos hiring jobs in columbus ohio britney pregnant florida state board of counseling licensure head hilton oceanfront rental full metal alchemist again lirycs trusted investments starter credit cards cape cod vacation rentals free printable greeting cards online citi card payment webster university laptop battery loan borse miu miu car rental companys people falling videos panics videos soapy punishment enemas domain top stock picks car rentals ft lauderdale international airport how can u make money with unicorns in runescape car rental europe prague jobs in rumford maine bargain tours and travels us dv visa lottery planes trains automobiles movie control and order stock is the google onlie job a scam pharrell williams frontin video plan b movie diane keaton sitemap please bang my wife videos geting bank american airlines american eagle lazy eye arkansas beebe university phoenix arts centre gaming lounge arkansas athletics tech mortal combat video games work from home typing links musiktitel aylar lie.
[edit] Limiting subsection levels shown in TOC
http://bugzilla.wikimedia.org/show_bug.cgi?id=6575
If you would like to have a heading not show up in the generated Table of Contents at the top of the page, you can use HTML to make the header... or at least that worked in older versions!
<h2>stuff that better not be included</h2>
<nowiki><h2>stuff that better not be included</h2>
</nowiki>
This won't show up...
<big><b>This won't show up... </b></big>
<H4>yikes this would be included in toc... h4... </H4>
====this would of course be included in toc header 4 example ====
[edit] Sections for demo above
[edit] Demo a
This section is linked to from #Section linking.
[edit] Demo http://a
This section is linked to from #Section linking.

