[sunting] [versi terdahulu] [hapus singgahan] Ikon dokumentasi Dokumentasi templat

     DRAFT

    This template/module is far from being mature but aspires to become a standard means of building a table of contents suitable for use on WikiSource. Please note bugs/shortcomings/suggestions on the talk page.

    {{TOCstyle
     | model              =
     | starting           =
     | continuing         =
     | completing         =
     | header             =
     | footer             =
     | class              =
     | style              =
     | compact            =
     | width              =
     | depth              =
     | chapter-width      =
     | page-width         =
     | rowStoEmodel       =
     |   rowS-Emodel      =
     | rowStoEpageribbon  =
     |   rowS-Epageribbon =
     | rowStoEstyle       =
     |   rowS-Estyle      =
     | rowX,Y..model      =
     | rowX,Y..pageribbon =
     | rowX,Y..style      =
     | rowRmodel          =
     | rowRpageribbon     =
     | rowRstyle          =
     | demoSpace          =
     | leadersym          =
     | leaderrepeat       =
     | leaderspacing      =
     | leaderbgcolour     =
     | field | field | ...
    }}

    Parameters

    sunting
    Page: space output control

    Enabling any of the five following flags causes generation of part of the output HTML to be suppressed. Specifically choosing either {{{continuing}}} or {{{completing}}} affects the operation of other parameters and will entirely disable the effect of {{{class}}}, {{{compact}}}, {{{style}}} or {{{width}}}. In practice there is normally a related Templat:Tlp present which may be used to host any such orphaned specifications.

    • {{{starting}}}: if set to any value (typically 'yes'), generates HTML usable as first page in set of multiple pages.
    • {{{continuing}}}: if set to any value (typically 'yes'), generates HTML usable as middle (i.e. not first nor last) page in set of multiple pages.
    • {{{completing}}}: if set to any value (typically 'yes'), generates HTML usable as last page in set of multiple pages.
    • {{{header}}}: if set to any value (typically 'yes'), generates HTML usable in header region of Page: in order to continue table of contents commenced on a prior page to this one.
    • {{{footer}}}: if set to any value (typically 'yes'), generates HTML usable in footer region of Page: in order to continue table of contents terminating on a successive page to this one.
    Overall effect
    • {{{model}}}: may be set to one of a number of standard mnemonic values (detailed below) intended to suggest a layout desired to be applied to each "row" of the generated table of contents. If no choice made model "D" (described below) is automatically applied.
    • {{{demoSpace}}}: Name space prefix to be treated as equivalent to 'Page' when producing HTML which normally would not be available for transclusion (mainly affects page-crossing constructs e.g. the '/s', '/c' and '/e' model variants and page-ribbon effects.)
    • {{{class}}}: User-specified class name(s) to be applied to the overall <div> which wraps output.
    • {{{style}}}: User-specified CSS style directives to be applied to the overall <div> which wraps output.
      One useful application might be to apply |style=display:table;margin:0 auto 0 auto which results in a block-centred TOC whose width automatically adapts to accommodate the longest internal row (only noticeable if all TOC items are relatively compact.)
    • {{{compact}}}: Preselect self-sizing centred output per above note on {{{style}}}.
    • {{{width}}}: Overall width limitation to be applied to output (if specified, automatic margin centring will be applied. The default is to utilise all available container width.)
    • {{{depth}}}: On models which make use of this, provides a user-specifiable hanging-indent factor. Default is 5em.
    • {{{chapter-width}}}: On models which make use of this, provides a user-specifiable chapter width. Default is 5em.
    • {{{page-width}}}: On models which make use of this, provides a user-specifiable page width. Default is 2em.
    Leader Control

    The following parameters affect all output rows which involve any kind of variable leader, with the exception that the "CD.P" model selected leader pattern preempts {{{leadersym}}}:

    • {{{leadersym}}}: a single or short sequence of symbols which will be repeated to form the leader. Default: period ".".
    • {{{leaderrepeat}}}: repetition factor used by {{{leadersym}}} above. Reducing this from the default may materially assist in reducing "template include size" borderline cases, at the cost of catering for wide output screen widths. A rule-of-thumb for calculating a usable minimum value would be to divide the widest possible presentation width by the sum of the rendered width of a single instance of {{{leadersym}}} (: the default period "." is approximately 4px) and the value of {{{leaderspacing}}} () viz. , and add a safety margin (say 10%). For example if {{{width}}} is set to 400px and other parameters left at their respective default values, setting this parameter to 55 (or better 60) ought to be adequate. Default: 384.
    • {{{leaderspacing}}}: Inter-symbol spacing to be applied across width of leader. Default: 4px.
    • {{{leaderbgcolor}}} (alias {{{leaderbgcolour}}}): Background colour choice for descriptive text immediately preceding leader. Default: white.
    Affects a single output row only
    • {{{rowRmodel}}}: as for {{{model}}} above but affects the choice of layout specified for one row only.
    • {{{rowRpageribbon}}}: this row of output displays only in the 'Page' namespace (or any other name space nominated via {{{demoSpace}}}.) This permits, for example column headings to appear on each individual page whilst not rendering into the final transclusion. This parameter is a flag (i.e. not a model) and can only be usefully set to a value such as "true" or "yes" in order to influence the interpretation of the model chosen for this row by other means.
    • {{{rowRstyle}}}: additional CSS styling to apply to a particular row. Typically used for indenting, e.g. margin-left:2em
    Affects multiple rows at once
    • {{{rowStoEmodel}}}: as for {{{rowRmodel}}} above but affects the choice of layout specified for every row between rows S and E inclusive. The selection is subordinate to {{{rowRmodel}}} but overrules {{{model}}}. An alternate format {{{rowS-Emodel}}} is recognised without deterministic precedence. You were warned!
    • {{{rowStoEpageribbon}}}: as for {{{rowRpageribbon}}}. Subordinate to {{{rowRpageribbon}}}. Alternate format {{{rowS-Emodel}}} is recognised with similar provisos to above.
    • {{{rowStoEstyle}}}: macro form. Subordinate to {{{rowRstyle}}}. Alternate format {{{rowS-Estyle}}} is recognised with similar provisos to above.
    • {{{rowX,Y..model}}}: as for {{{rowRmodel}}} above but affects the choice of layout specified for every row nominated. The selection is subordinate to {{{rowRmodel}}} but overrules {{{rowStoEmodel}}} should their zones of influence overlap.
    • {{{rowX,Y..pageribbon}}}: as for {{{rowRpageribbon}}}. Subordinate to {{{rowRpageribbon}}} but may overrule {{{rowStoEpageribbon}}} in cases of apparent conflict.
    • {{{rowX,Y..style}}}: as for {{{rowRstyle}}}. Subordinate to {{{rowRstyle}}} but may overrule {{{rowStoEstyle}}} in cases of apparent conflict.
    Of technical interest only
    • {{{debugArgs}}}: dump content of entire LUA argument hash table into top of generated HTLM stream. This is desperate stuff: once experienced you will never be able to unsee the awful truth.

    Available 'models'

    sunting
    D
    ("Description") default choice. Output row is constructed from a single unformatted item.
    DP
    ("Description with Page") Output row is constructed from pairs of input fields. Within each pair the first field is presented as an unformatted description and the latter as right-lower-aligned.
    H5P
    ("Wide Hanging with Page") Output row is constructed from pairs of input fields. Within each pair the first field is presented as an wide hanging indented description (field intended to align with CDP entries; overlapping Chapter region) and the latter as a right-lower-aligned page reference.
    2H3P
    ("Indented Hanging with Page") Output row is constructed from pairs of input fields. Within each pair the first field is presented as an indented hanging indented description (field intended to align with CDP entries; overlapping Chapter region but with left margin offset) and the latter as a right-lower-aligned page reference.
    CDP
    ("Chapter, Description, Page") Output row is constructed from triples of input fields. The first field is presented as right-aligned within a minimum-width (4em) column, followed by a description field. Finally the third field is presented right-lower-aligned.
    D.P
    ("Description, dot-leader, Page") Output row is constructed from pairs of input fields. Within each pair the first field is presented as an unformatted description and the latter as right-lower-aligned, separated by a variable-length "standard" dot-leader.
    D?P
    ("Description, dot-leader-with arbitrary symbol, Page") Output row is constructed from triples of input fields. Within each, the first field is presented as an unformatted description and the third as right-lower-aligned, separated by a variable-length dot-leader composed by repeating the second field multiple times.
    CD.P
    ("Chapter, Description, dot-leader, Page") Output row is constructed from triples of input fields. The first field is presented as right-aligned within a minimum-width (4em) column with 1em right-padding, followed by a description field with standard dot-leader trailing. Finally the third field is presented right-lower-aligned.
    C5D.P
    ("Chapter, Description, dot-leader, Page") Variant of CD.P without padding following Chapter field; otherwise identical.
    2CD.P
    ("Indented Chapter, Description, dot-leader, Page") Variant of CD.P with inherent 2em indentation applied.
    CD.P/s
    variant of CD.P. Initial fragment to be continued on next page.
    CD.P/e
    Completion of fragment commenced by CD.P/s.
    CH2.P
    ("Chapter, Large-hanging-indented description, dot-leader, Page") Output row is constructed from triples of input fields. The first field is presented as right-aligned within a minimum-width (4em) column, followed by a description field with 2em hanging indent and standard dot-leader trailing. Finally the third field is presented right-lower-aligned.
    mCHn.pP
    ("Generalised-depth/width" variant) of CH2.P above. Associated with {{{chapter-width}}}, {{{depth}}} and {{{page-width}}}.
    mCHn.upP
    ("Undercut page number" variant) of mCHn.pP above, and similarly associated with {{{chapter-width}}}, {{{depth}}} and {{{page-width}}}.
    CD.uP
    ("Chapter, Description, dot-leader, undercut Page") Output row is constructed from triples of input fields. The first field is presented as right-aligned within a minimum-width (4em) column with 1em right-padding, followed by a description field with standard dot-leader trailing. Finally the third field is presented right-lower-aligned, undercut into the final line.
    H5.P
    ("Wide Hanging with dot-lead Page") Output row is constructed from pairs of input fields. Within each pair the first field is presented as an wide hanging indented description (field intended to align with CDP entries; overlapping Chapter region) and the latter as a leader-introduced right-lower-aligned page reference.
    Hn.P
    ("Generalised-depth" variant) of H5.P above. Associated with {{{depth}}}.
    Hn.upP
    ("Generalised-page width" undercut variant) of Hn.P above. Associated with {{{depth}}} and {{{page-width}}}.
    2H3.P
    ("Indented Hanging with dot-lead Page") Output row is constructed from pairs of input fields. Within each pair the first field is presented as an indented hanging indented description (field intended to align with CDP entries; overlapping Chapter region but with left margin offset) and the latter as a right-lower-aligned dot-lead page reference. (N.B. there is currently an inherent weakness in the implementation of this model: descriptions which render on a single line may suffer blanking of initial characters. This needs to be addressed.)
    2H3P/s
    ("Indented Hanging Indent initial page crossing section") Build TOC fragment per 2H3P above but with expectation the fragment will continue on a later Page. (Differing HTML is constructed for demonstration and presentation name spaces.)
    2H3P/e
    ("Indented Hanging Indent terminal page crossing section") Continuation of TOC fragment commenced by 2H3P/s. (Differing HTML is constructed for demonstration and presentation name spaces.)
    lcr
    ("left-centred-right") Output row is constructed from triples of input fields in a fashion reminiscent of {{running header}} with three parameters specified.
    lccr
    ("left-centred-right") Output row is constructed from triples of input fields in a fashion reminiscent of {{running header}} with four parameters specified.
    lcccr
    ("left-centred-right") Output row is constructed from triples of input fields in a fashion reminiscent of {{rh/5}}.
    c
    ("center") Output row is constructed from single field, centred.
    h
    ("hanging") Output row is constructed from single field with short hanging indent applied.
    7h2
    ("indented hanging") Output row is constructed from single field with indent and clearances from both Chapter and Page columns when used in close association with (for example) CDP model lines.
    j
    ("justify") Output row is constructed from single field, justified.
    l
    ("left") Output row is constructed from single unformatted fields.
    r
    ("right") Output row is constructed from single field, right-aligned.
    lr
    ("left-right") Output row is constructed from pairs of input fields in a fashion reminiscent of {{running header}} with the "center" parameter omitted. (Degenerate form of model "lcr".)

    The above list is all the models currently implemented and is intended to be expanded as cases/suggestions arise. See ahead. Detection of unusable models will result in the entire table being replaced by an error message.

    Limitations

    sunting
    • Owing to the complexity of the code generated by this template, it should not be used over an extended range of Page: if leader based models are used. (such as D.P, CD.P etc). If used for content such as an index, then that index will need to be sectionalised (typically by inital letter) in transclusion.

    Examples

    sunting
    {{TOCstyle|model=DP
    |{{lorem ipsum}}|Page 15
    |row2model=c|'''Centred:''' {{lorem ipsum}}
    |row3model=h|'''Hanging:''' {{lorem ipsum}}
    |row4model=j|'''Justified:''' {{lorem ipsum}}
    |row5model=l|'''Left:''' {{lorem ipsum}}
    |row6model=r|'''Right:''' {{lorem ipsum}}
    |row7model=lcr|Progressive Left|Confused and Huddled Masses|Conservative Right
    |row8model=lccr|Communists|Democrats|Republicans|Fascists
    |row9model=lcccr|This|Is|Really|Fine|Grain
    |row10model=D|'''Descriptive:''' {{lorem ipsum}}
    |row11model=D.P|'''leader:''' {{lorem ipsum}}|118
    |row12model=D?P|'''leader with custom symbol:''' {{lorem ipsum}}|&bull;|118
    |row13model=lr|Left!|Right!
    |row14model=CD.P|'''Chapter XI'''|'''+description with page leader:''' {{lorem ipsum}}|213
    |row15model=CDP|'''XII'''|'''+description only:''' {{lorem ipsum}}|242
    |row16model=H5P|'''"Wide hanging" description:''' {{lorem ipsum}}|248
    |row17model=2H3P|'''"Indented hanging" description:''' {{lorem ipsum}}|249
    |row18model=H5.P|'''"Wide hanging dot-leader" description:''' {{lorem ipsum}}|257
    |row19model=2CD.P|'''Chapter XI'''|'''(indented) + description with page leader:''' {{lorem ipsum}}|213
    |row20model=CH2.P|'''Chapter XIV'''|'''+ large hanging indented description with page leader:''' {{lorem ipsum}}|1212
    |row21model=C5D.P|'''Chapter XI'''|'''+description with page leader:''' {{lorem ipsum}}|213
    |row22model=7h2|'''indented hanging description with page clearance:''' {{lorem ipsum}}
    |row23model=CD.uP|'''Chapter XI'''|'''+description with page leader, page number undercut:''' {{lorem ipsum}}|213
    }}
    
    1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.Page 15
    2. Centred: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    3. Hanging: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    4. Justified: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    5. Left: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    6. Right: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    7. Progressive LeftConfused and Huddled MassesConservative Right
    8. CommunistsDemocratsRepublicansFascists
    9. ThisIsReallyFineGrain
    10. Descriptive: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    11. leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      118
    12. leader with custom symbol: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
      118
    13. Left!Right!
    14. Chapter XI
      +description with page leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      213
    15. XII+description only: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.242
    16. "Wide hanging" description: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.248
    17. "Indented hanging" description: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.249
    18. "Wide hanging dot-leader" description: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      257
    19. Chapter XI
      (indented) + description with page leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      213
    20. Chapter XIV
      + large hanging indented description with page leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      1212
    21. Chapter XI
      +description with page leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      213
    22. indented hanging description with page clearance: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
    23. Chapter XI
      +description with page leader, page number undercut: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.213
      ................................................................................................................................................................................................................................................................................................................................................................................................
    {{TOCstyle|model=crazy
    |Demonstration of handling of unrecognised models:
    }}
    


    Invalid model: "crazy" apparently requested on behalf of row 1?

    {{TOCstyle|model=D.P
    |'''leader:''' {{lorem ipsum}}|118
    |row2model=D?P|'''leader with custom symbol:''' {{lorem ipsum}}|&bull;|118
    }}
    
    1. leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ................................................................................................................................................................................................................................................................................................................................................................................................
      118
    2. leader with custom symbol: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
      118
    {{TOCstyle|model=D.P|leadersym=&middot;|leaderspacing=1em|leaderbgcolour=#ECFCF4
    |'''leader:''' {{lorem ipsum}}|118
    |row2model=D?P|'''leader with custom symbol:''' {{lorem ipsum}}|&bull;|118
    }}
    
    1. leader: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ································································································································································································································································································································································································
      118
    2. leader with custom symbol: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
      ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
      118

    Some notes on internals

    sunting

    It is hoped that the internal LUA code will be reasonably simple to augment. Any variable named with suffix …Tags contains opening and closing HTML strings applicable to a given situation.

    For example outerTags holds HTML specific to header- and footer- use and is used to "wrap" the entire output.

    modelTab holds a structure keyed upon model names. Within each element there are sub-elements to indicate how many fields a single output row will consume under this model, and the name of a routine and its parameters required to format that row.

    Internal structures.
    starting=yes
    <div> <ol> <li> <table> </table> </li> </ol> </div>
    …repeated for as many rows as required…
    <li> <table> </table> </li>
    header=yes continuing=yes footer=yes
    completing=yes

    Templat:Sandbox other