Template:Dotted TOC page listing/doc

This template is intended for replicating an original work's Table of Contents entries within the Wikisource Page: namespace.

Usage
Parameters:
 * : the chapter number (optional). Displays in a column to the left of the main text.
 * : the title of the chapter or entry
 * : the page number to be linked; can be any text including Roman numerals, etc.; for wikilinking, consider Scan page link 2
 * : any series of characters or images. Default is a single period. (".") NB! Do not use any templates inside this parameter. Any templates here will be expanded (to much more than the single dot) and then repeated ~50 times for every single line. A large, but not abnormal, TOC observed in the wild generated ~1.5MB of HTML output (and hit the MediaWiki hard transclusion limit).
 * : The number of spaces between symbols — a number from 0 to 10. Default is 1.
 * : Additional text at the end of the line of dots, for offsets etc.
 * : Display page number to wikilink to; must be an Arabic number
 * : use with pagenum to wikilink to compute page number of current document to link to, adjusted for pages of front matter
 * : a measure for the hanging indent when text overflows to a second line. Default is 1em.
 * : Adjusts the width of the chapter column. Default is 2.5em.
 * : Adjusts the alignment of the chapter column. Default is "right".
 * : Adjusts the alignment of the entry (second) column. Default is "left"; alternate choice: "justify".
 * : Adjusts the width of the entry column. Default is 80%.
 * : Adjusts the width of the third column. Default is 2em.
 * : Adjusts the alignment of the third column. Default is "right"; alternate choice: "center" or "left".
 * : Replaces the series of periods (".") by text.
 * : Adds an extra fourth column after the page number.
 * : Adjusts the width of the fourth column. Default is 2em.
 * : Adjusts the alignment of the fourth column. Default is "right"; alternate choice: "center" or "left".
 * : Adjusts the CSS background of the entry text. Default is white. (Note: this is not the same as "none")

Related
To cater for situations where a desired listing crosses one or more page boundaries, a number of variants upon this template exist, all of which accept the same parameters (and silently ignore any which do not apply to them):
 * : permits specification of listing segment appearing above the page break.
 * : (normally appears in page footer) closes off listing processing for current page only.
 * : (normally appears in page header) reopens listing processing for a new page.
 * : (appears in subsequent body; not normally required) continues specification of entry component of listing on a new page, which will be completed only on yet another following page.
 * : (normally appears at top of page body) completes specification of entry component initiated on a prior page.

Applying dotted TOC page listing/topdotted TOC page listing/continuedotted TOC page listing/bottom (no intervening new-lines between template invocations; all bearing same parameter specifications) should produce the same result as using dotted TOC page listing with only minor deviations from the same parameters and values normally used in the core template.

Examples

 * For an example of the use of (combined with ) see: this page.
 * For an example of the use of (etc.) see: this page (and the next); and how it looks in the main namespace: this page.
 * For examples of  and , which work together, see (this page and the other tables of contents in that document)

Redirect

 * Template:TOC line — redirect usage deprecated 6/7/2014; inconsistent &/or non-descriptive naming.

Export
Because this template uses an entire table for every row, it does usually not export well to devices with simpler CSS engines (e.g. e-readers). It also generates a very large amount of HTML markup. Templates like TOC row 1-dot-1/TOC row 2dot-1 export better as they result in a single table for the whole TOC. If the amount of HTML is causing issues with the Mediawiki transclusion limits, consider not using dots at all.