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