Template:SimpleTOC3/s
This template uses TemplateStyles: |
This is an attempt to create a TOC template system that is as stripped-down as possible. It is intended to use for very long tables of contents or indexes, to try and keep them under the template expansion limit. It is a 3-column variant of the 2-column SimpleTOC template, and is still undergoing some minor fine tuning regarding cell padding.
- {{SimpleTOC3/s}}
- {{SimpleTOC3 line}}
- {{SimpleTOC3/e}}
How to use
[edit]- Start the TOC with {{SimpleTOC3/s}}
- Each line of the TOC will use {{SimpleTOC3 line}}, which has three parameters:
- the text that goes in the first column (e.g. chapter number), default right aligned - note that a width (2em) is set by default for this column, although users may wish to override this on index-specific style sheets
- the text that goes in the second column (e.g. the chapter title)
- the text that goes in the third column (e.g. the page number)
- End the TOC with {{SimpleTOC3/e}}
For example:
{{SimpleTOC3/s}} {{SimpleTOC3 line | I. | Chapter 1 | 1 }} {{SimpleTOC3 line | II. | Chapter 2 | 11 }} {{SimpleTOC3 line | III. | Chapter 3 | 21 }} {{SimpleTOC3 line | IV. | Chapter 4 | 31 }} {{SimpleTOC3/e}}
This gives the following result:
Styling
[edit]This template deliberately avoids parameters for inline CSS (which will make the template too unwieldy for long tables). Instead, use TemplateStyles and Index-specific style sheets to control the layout and appearance of this template.
You can use the parameters nclass
, cclass
and pclass
to add a CSS class to the chapter number, chapter title and page fields respectively, that can be targeted by your style sheets.
The following classes are included in this template:
cclass=stoc3-nodots
- removes the dot leaders
Note to template editors
[edit]You may be tempted to expand this template to support more complex tables of contents. While this is a desirable aim, please ensure that the templates remain as small as possible or else you may break some very long indices that are already using this template.