User:Arcorann/TOCstyle

Comparisons of several different TOC templates

 * TOC line series:
 * One row at a time
 * Rarely seen.
 * TOC page listing series:
 * One row at a time, with or without dot leaders. Mixes table and div syntax.
 * Mostly deprecated, but still in use in some places.
 * TOC row series:
 * Reasonably versatile series, can be used for 3 or 4 column table layouts. Also can do ragged.
 * In common use.
 * TOCstyle:
 * Single template with many formats, Lua-based.
 * Adding formats is non-obvious (largely because the naming scheme is non-obvious...)
 * Outputs a weird structure (tables nested inside a list?) with a lot of inline styling
 * SimpleTOC:
 * Uses a simple formatted div
 * Sometimes used for indices.
 * Only supports two columns (chapter name, page)
 * Raw table + index CSS:
 * Index CSS allows column formatting using nth-child(k)
 * Reasonably clean
 * es:Plantilla:Índice con puntos (es:Módulo:ICP)
 * One fixed 3-column model
 * Has autolinking
 * In Spanish

Various works

 * Page:A short history of astronomy(1898).djvu/19:
 * TOC page listing series. Uses manually added gaps to align.
 * Page:Literary Lapses - Leacock - 1919.djvu/9:
 * TOC row series. This is a textbook case for TOCstyle, though (model D.P).
 * Page:Light waves and their uses.djvu/17:
 * TOC line series.
 * Page:Hakluytus Posthumus or Purchas His Pilgrimes Volume 12.djvu/12:
 * TOCstyle, mix of H5P, 2H3P and CD.P models, continuing from previous page
 * Page:Lisbon and Cintra, Inchbold, 1907.djvu/15:
 * TOCstyle, mix of c and 2H3P models
 * Page:Buried cities and Bible countries (1891).djvu/11:
 * TOCstyle, somewhat complex
 * Page:The Story of Philosophy.pdf/11:
 * TOC row, with some index CSS
 * Page:The American language; an inquiry into the development of English in the United States (IA americanlanguage00menc 0).pdf/7
 * Raw table and index CSS
 * Index CSS used to target colspan attributes making it unnecessary to label different types of rows

TOC line
Input:

Output: 

Render:



Dotted TOC page listing
Input:

Output: 

TOC row
Input:

Output: 

Render:



TOCstyle
Input:

Output:   

Render:

  </ol>

ICP
Input:

Output (on esWS): <templatestyles src="Plantilla:Índice con puntos/estilo.css" />

SimpleTOC
Input:

Output: <templatestyles src="SimpleTOC/styles.css" /> I. My Financial Career XXXVIII. Sandbox

Render:

Proposals

 * Autolink: link chapter titles and/or page numbers automatically
 * Auto small caps
 * "TOCstyle simple", or something of that sort: for common models with a header row

Hypothetical replacement
Or: xkcd 927 time.


 * Table or div-based. None of this tables-wrapped-inside-an-ul crap (seriously why TOCstyle)
 * Probably
 * Indent things like ppoem does
 * Autolink, as above
 * Presets
 * Class-based formatting for column types (chapter num, title, description, page num)