Template:TOC limit/doc: Difference between revisions

m
Text replacement - "(={2,})([^\s=])(.+)([^\s=])(={2,})" to "$1 $2$3$4 $5"
(Created page with "This template inserts a Table of Contents which omits subheadings beyond a certain depth. The table obeys the same layout rules as the <nowiki>__TOC__</nowiki> magic word. Omi...")
 
m (Text replacement - "(={2,})([^\s=])(.+)([^\s=])(={2,})" to "$1 $2$3$4 $5")
Line 16: Line 16:


=== TOC levels versus wikitext header levels ===
=== TOC levels versus wikitext header levels ===
The heading levels in the TOC normally correspond to the header levels in the wikitext, so a "== Level-2 header ==" will normally generate the first-level ("1") TOC headings, a "=== Level-3 header ===" will normally generate the second-level ("1.1") TOC headings, and so on. This correspondence does ''not'' hold if the page contains "= Level-1 headers =" or skips header levels. For example, wikitext like this:
The heading levels in the TOC normally correspond to the header levels in the wikitext, so a "== Level-2 header == " will normally generate the first-level ("1") TOC headings, a " === Level-3 header ===" will normally generate the second-level ("1.1") TOC headings, and so on. This correspondence does ''not'' hold if the page contains "= Level-1 headers =" or skips header levels. For example, wikitext like this:
  == Level-2 heading (A) ==
  == Level-2 heading (A) ==
  === Level-3 heading (B) ===
  === Level-3 heading (B) ===