Help:Section

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search
See mw:Help:Formatting for syntax examples for section headers.

Contents

[edit] Linking to a section

Each section header has an anchor element to which links can point. These anchors are automatically used by the MediaWiki software when generating a Table of Contents for the page. These can also be linked to with normal links. See mw:Help:Links for examples.

[edit] 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 table of contents such as created by {{compactTOC}}.

[edit] Horizontal dividing lines

A horizontal dividing line as a division demarcation is not taken into account in the section numbering and TOC. Therefore it should not be used for dividing a page in sets of sections.

[edit] Sections vs. separate pages vs. transclusion

Advantages of separate pages
  • What links here feature
  • Automatic redirect on renaming
  • Redirect to a section is not possible
  • Loading a small page is faster than loading a large page
Advantages of one large page with sections
  • Loading one large page is faster and more convenient than loading several small ones
  • Searching with in 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.
Advantages of transcluded sections
  • Edit histories are kept separate.
  • Content can be shared between pages.

See composite pages for more on this.