source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/params/generate.toc.xml@ 1fa2099

multilib-10.1
Last change on this file since 1fa2099 was 1fa2099, checked in by Thomas Trepl <thomas@…>, 5 years ago

Initial creation of multilib branch

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11565 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.6 KB
Line 
1<refentry xmlns="http://docbook.org/ns/docbook"
2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xmlns:xi="http://www.w3.org/2001/XInclude"
4 xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="5.0" xml:id="generate.toc">
7<refmeta>
8<refentrytitle>generate.toc</refentrytitle>
9<refmiscinfo class="other" otherclass="datatype">table</refmiscinfo>
10</refmeta>
11<refnamediv>
12<refname>generate.toc</refname>
13<refpurpose>Control generation of ToCs and LoTs</refpurpose>
14</refnamediv>
15
16<refsynopsisdiv>
17<src:fragment xml:id="generate.toc.frag">
18<xsl:param condition="html" name="generate.toc">
19appendix toc,title
20article/appendix nop
21article toc,title
22book toc,title,figure,table,example,equation
23chapter toc,title
24part toc,title
25preface toc,title
26qandadiv toc
27qandaset toc
28reference toc,title
29sect1 toc
30sect2 toc
31sect3 toc
32sect4 toc
33sect5 toc
34section toc
35set toc,title
36</xsl:param>
37<xsl:param condition="fo" name="generate.toc">
38/appendix toc,title
39article/appendix nop
40/article toc,title
41book toc,title,figure,table,example,equation
42/chapter toc,title
43part toc,title
44/preface toc,title
45reference toc,title
46/sect1 toc
47/sect2 toc
48/sect3 toc
49/sect4 toc
50/sect5 toc
51/section toc
52set toc,title
53</xsl:param>
54</src:fragment>
55</refsynopsisdiv>
56
57<refsection><info><title>Description</title></info>
58
59<para>This parameter has a structured value. It is a table of space-delimited
60path/value pairs. Each path identifies some element in the source document
61using a restricted subset of XPath (only the implicit child axis, no wildcards,
62no predicates). Paths can be either relative or absolute.</para>
63
64<para>When processing a particular element, the stylesheets consult this table to
65determine if a ToC (or LoT(s)) should be generated.</para>
66
67<para>For example, consider the entry:</para>
68
69<screen>book toc,figure</screen>
70
71<para>This indicates that whenever a <tag>book</tag> is formatted, a
72Table Of Contents and a List of Figures should be generated. Similarly,</para>
73
74<screen>/chapter toc</screen>
75
76<para>indicates that whenever a document <emphasis>that has a root
77of</emphasis> <tag>chapter</tag> is formatted, a Table of
78Contents should be generated. The entry <literal>chapter</literal> would match
79all chapters, but <literal>/chapter</literal> matches only <tag>chapter</tag>
80document elements.</para>
81
82<para>Generally, the longest match wins. So, for example, if you want to distinguish
83articles in books from articles in parts, you could use these two entries:</para>
84
85<screen>book/article toc,figure
86part/article toc</screen>
87
88<para>Note that an article in a part can never match a <literal>book/article</literal>,
89so if you want nothing to be generated for articles in parts, you can simply leave
90that rule out.</para>
91
92<para>If you want to leave the rule in, to make it explicit that you're turning
93something off, use the value <quote>nop</quote>. For example, the following
94entry disables ToCs and LoTs for articles:</para>
95
96<screen>article nop</screen>
97
98<para>Do not simply leave the word <quote>article</quote> in the file
99without a matching value. That'd be just begging the silly little
100path/value parser to get confused.</para>
101
102<para>Section ToCs are further controlled by the
103<parameter>generate.section.toc.level</parameter> parameter.
104For a given section level to have a ToC, it must have both an entry in
105<parameter>generate.toc</parameter> and be within the range enabled by
106<parameter>generate.section.toc.level</parameter>.</para>
107</refsection>
108</refentry>
Note: See TracBrowser for help on using the repository browser.