<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>generate.toc</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference Documentation"><link rel="up" href="toc_index.html" title="ToC/LoT/Index Generation"><link rel="prev" href="toc.max.depth.html" title="toc.max.depth"><link rel="next" href="generate.section.toc.level.html" title="generate.section.toc.level"><link rel="copyright" href="copyright.html" title="License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">generate.toc</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="toc.max.depth.html">Prev</a> </td><th width="60%" align="center">ToC/LoT/Index Generation</th><td width="20%" align="right"> <a accesskey="n" href="generate.section.toc.level.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="generate.toc"></a><div class="titlepage"></div> <div class="refnamediv"><h2><span class="refentrytitle">generate.toc</span></h2><p> generate.toc — Control generation of ToCs and LoTs </p></div> <div class="refsynopsisdiv"><h2>Synopsis</h2> <a name="generate.toc.frag"></a><pre class="programlisting"> <xsl:param 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> </pre> </div> <div class="refsection"><a name="idp281616"></a><h2>Description</h2> <p>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.</p> <p>When processing a particular element, the stylesheets consult this table to determine if a ToC (or LoT(s)) should be generated.</p> <p>For example, consider the entry:</p> <pre class="screen">book toc,figure</pre> <p>This indicates that whenever a <a href="http://docbook.org/tdg5/en/html/book.html"><code class="sgmltag-element">book</code></a> is formatted, a Table Of Contents and a List of Figures should be generated. Similarly,</p> <pre class="screen">/chapter toc</pre> <p>indicates that whenever a document <span class="emphasis"><em>that has a root of</em></span> <a href="http://docbook.org/tdg5/en/html/chapter.html"><code class="sgmltag-element">chapter</code></a> is formatted, a Table of Contents should be generated. The entry <code class="literal">chapter</code> would match all chapters, but <code class="literal">/chapter</code> matches only <a href="http://docbook.org/tdg5/en/html/chapter.html"><code class="sgmltag-element">chapter</code></a> document elements.</p> <p>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:</p> <pre class="screen">book/article toc,figure part/article toc</pre> <p>Note that an article in a part can never match a <code class="literal">book/article</code>, so if you want nothing to be generated for articles in parts, you can simply leave that rule out.</p> <p>If you want to leave the rule in, to make it explicit that you're turning something off, use the value <span class="quote">“<span class="quote">nop</span>”</span>. For example, the following entry disables ToCs and LoTs for articles:</p> <pre class="screen">article nop</pre> <p>Do not simply leave the word <span class="quote">“<span class="quote">article</span>”</span> in the file without a matching value. That'd be just begging the silly little path/value parser to get confused.</p> <p>Section ToCs are further controlled by the <a href="../html/generate.section.toc.level.html"><em class="parameter"><code>generate.section.toc.level</code></em></a> parameter. For a given section level to have a ToC, it must have both an entry in <a href="../html/generate.toc.html"><em class="parameter"><code>generate.toc</code></em></a> and be within the range enabled by <a href="../html/generate.section.toc.level.html"><em class="parameter"><code>generate.section.toc.level</code></em></a>.</p> </div> </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="toc.max.depth.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="toc_index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="generate.section.toc.level.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">toc.max.depth </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> generate.section.toc.level</td></tr></table></div></body></html>