| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 | <refentry xmlns="http://docbook.org/ns/docbook"          xmlns:xlink="http://www.w3.org/1999/xlink"          xmlns:xi="http://www.w3.org/2001/XInclude"          xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"          version="5.0" xml:id="generate.toc"><refmeta><refentrytitle>generate.toc</refentrytitle><refmiscinfo class="other" otherclass="datatype">table</refmiscinfo></refmeta><refnamediv><refname>generate.toc</refname><refpurpose>Control generation of ToCs and LoTs</refpurpose></refnamediv><refsynopsisdiv><src:fragment xml:id="generate.toc.frag"><xsl:param condition="html" name="generate.toc">appendix  toc,titlearticle/appendix  noparticle   toc,titlebook      toc,title,figure,table,example,equationchapter   toc,titlepart      toc,titlepreface   toc,titleqandadiv  tocqandaset  tocreference toc,titlesect1     tocsect2     tocsect3     tocsect4     tocsect5     tocsection   tocset       toc,title</xsl:param><xsl:param condition="fo" name="generate.toc">/appendix toc,titlearticle/appendix  nop/article  toc,titlebook      toc,title,figure,table,example,equation/chapter  toc,titlepart      toc,title/preface  toc,titlereference toc,title/sect1    toc/sect2    toc/sect3    toc/sect4    toc/sect5    toc/section  tocset       toc,title</xsl:param></src:fragment></refsynopsisdiv><refsection><info><title>Description</title></info><para>This parameter has a structured value. It is a table of space-delimitedpath/value pairs. Each path identifies some element in the source documentusing a restricted subset of XPath (only the implicit child axis, no wildcards,no predicates). Paths can be either relative or absolute.</para><para>When processing a particular element, the stylesheets consult this table todetermine if a ToC (or LoT(s)) should be generated.</para><para>For example, consider the entry:</para><screen>book toc,figure</screen><para>This indicates that whenever a <tag>book</tag> is formatted, aTable Of Contents and a List of Figures should be generated. Similarly,</para><screen>/chapter toc</screen><para>indicates that whenever a document <emphasis>that has a rootof</emphasis> <tag>chapter</tag> is formatted, a Table ofContents should be generated. The entry <literal>chapter</literal> would matchall chapters, but <literal>/chapter</literal> matches only <tag>chapter</tag>document elements.</para><para>Generally, the longest match wins. So, for example, if you want to distinguisharticles in books from articles in parts, you could use these two entries:</para><screen>book/article toc,figurepart/article toc</screen><para>Note that an article in a part can never match a <literal>book/article</literal>,so if you want nothing to be generated for articles in parts, you can simply leavethat rule out.</para><para>If you want to leave the rule in, to make it explicit that you're turningsomething off, use the value <quote>nop</quote>. For example, the followingentry disables ToCs and LoTs for articles:</para><screen>article nop</screen><para>Do not simply leave the word <quote>article</quote> in the filewithout a matching value. That'd be just begging the silly littlepath/value parser to get confused.</para><para>Section ToCs are further controlled by the<parameter>generate.section.toc.level</parameter> parameter.For a given section level to have a ToC, it must have both an entry in <parameter>generate.toc</parameter> and be within the range enabled by<parameter>generate.section.toc.level</parameter>.</para></refsection></refentry>
 |