summaryrefslogtreecommitdiffstats
path: root/kdoctools/docbook/xsl/params/generate.toc.xml
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kdoctools/docbook/xsl/params/generate.toc.xml
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdoctools/docbook/xsl/params/generate.toc.xml')
-rw-r--r--kdoctools/docbook/xsl/params/generate.toc.xml105
1 files changed, 105 insertions, 0 deletions
diff --git a/kdoctools/docbook/xsl/params/generate.toc.xml b/kdoctools/docbook/xsl/params/generate.toc.xml
new file mode 100644
index 000000000..aa8e3d590
--- /dev/null
+++ b/kdoctools/docbook/xsl/params/generate.toc.xml
@@ -0,0 +1,105 @@
+<refentry id="generate.toc">
+<refmeta>
+<refentrytitle>generate.toc</refentrytitle>
+<refmiscinfo role="type">table</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.toc</refname>
+<refpurpose>Control generation of ToCs and LoTs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='generate.toc.frag'>
+<xsl:param condition="html" name="generate.toc">
+appendix toc,title
+article/appendix nop
+article toc,title
+book toc,title,figure,table,example,equation
+chapter toc,title
+part toc,title
+preface toc,title
+qandadiv toc
+qandaset toc
+reference toc,title
+sect1 toc
+sect2 toc
+sect3 toc
+sect4 toc
+sect5 toc
+section toc
+set toc,title
+</xsl:param>
+<xsl:param condition="fo" name="generate.toc">
+/appendix toc,title
+article/appendix nop
+/article toc,title
+book toc,title,figure,table,example,equation
+/chapter toc,title
+part toc,title
+/preface toc,title
+qandadiv toc
+qandaset toc
+reference toc,title
+/sect1 toc
+/sect2 toc
+/sect3 toc
+/sect4 toc
+/sect5 toc
+/section toc
+set toc,title
+</xsl:param>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>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.</para>
+
+<para>When processing a particular element, the stylesheets consult this table to
+determine 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 <sgmltag>book</sgmltag> is formatted, a
+Table 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 root
+of</emphasis> <sgmltag>chapter</sgmltag> is formatted, a Table of
+Contents should be generated. The entry <literal>chapter</literal> would match
+all chapters, but <literal>/chapter</literal> matches only <sgmltag>chapter</sgmltag>
+document elements.</para>
+
+<para>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:</para>
+
+<screen>book/article toc,figure
+part/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 leave
+that rule out.</para>
+
+<para>If you want to leave the rule in, to make it explicit that you're turning
+something off, use the value <quote>nop</quote>. For example, the following
+entry disables ToCs and LoTs for articles:</para>
+
+<screen>article nop</screen>
+
+<para>Do not simply leave the word <quote>article</quote> in the file
+without a matching value. That'd be just begging the silly little
+path/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>
+</refsect1>
+</refentry>