generate.toc
Prev | ToC/LoT/Index Generation | Next

## Name

generate.toc — Control generation of ToCs and LoTs

## Synopsis

§19: §137
      1|
       | <xsl:param name="generate.toc">
       | /appendix toc
       | /article  toc
      5| book      toc,figure,table,example,equation
       | /chapter  toc
       | part      toc
       | /preface  toc
       | qandadiv  toc
     10| qandaset  toc
       | reference toc
       | /section  toc
       | set       toc
       | </xsl:param>

## Description

This parameter has a structured value. It is a table of space-delimited path/value pairs. Each path identifies some element in the source document using a restricted subset of XPath (only the implicit child axis, no wildcards, no predicates). Paths can be either relative or absolute.

When a particular element, the stylesheets consult this table to determine if a ToC (or LoT(s)) should be generated.

For example, consider the entry:

    book toc,figure

This indicates that whenever a `book` is formatted, a Table Of Contents and a List of Figures should be generated. Similarly,

    /chapter toc

indicates that whenever a document that has a root of `chapter` is formatted, a Table of Contents should be generated. The entry `chapter` would match all chapters, but `/chapter` matches only `chapter` document elements.

Generally, the longest match wins. So, for example, if you want to distinguish articles in books from articles in parts, you could use these two entries:

    book/article toc,figure
    part/article toc

Note that an article in a part can never match a `book/article`, so if you want nothing to be generated for articles in parts, you can simply leave that rule out.

Prev | Up | Next
process.source.toc | Home | generate.index