../params/textinsert.extension.xml \
../params/toc.list.type.xml \
../params/toc.section.depth.xml \
+ ../params/toc.max.depth.xml \
../params/ulink.target.xml \
../params/use.embed.for.svg.xml \
../params/use.extensions.xml \
../params/table.cell.border.thickness.xml \
../params/table.frame.border.color.xml \
../params/table.frame.border.style.xml \
- ../params/table.frame.border.thickness.xml
+ ../params/table.frame.border.thickness.xml \
+ ../params/ignore.image.scaling.xml \
+ ../params/footnote.number.format.xml \
+ ../params/table.footnote.number.format.xml \
+ ../params/footnote.number.symbols.xml \
+ ../params/table.footnote.number.symbols.xml \
+ ../params/entry.propagates.style.xml \
+ ../params/glossentry.show.acronym.xml \
+ ../params/xref.with.number.and.title.xml
</xsl:choose>
</xsl:variable>
+ <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
<xsl:variable name="subtoc.list">
<xsl:choose>
<xsl:when test="$toc.dd.type = ''">
<xsl:apply-templates select="." mode="title.markup"/>
</a>
<xsl:if test="$toc.listitem.type = 'li'
- and $toc.section.depth > $depth and count($nodes)>0">
+ and $toc.section.depth > $depth and count($nodes)>0
+ and $toc.max.depth > $depth.from.context">
<xsl:copy-of select="$subtoc.list"/>
</xsl:if>
</xsl:element>
<xsl:if test="$toc.listitem.type != 'li'
- and $toc.section.depth > $depth and count($nodes)>0">
+ and $toc.section.depth > $depth and count($nodes)>0
+ and $toc.max.depth > $depth.from.context">
<xsl:copy-of select="$subtoc.list"/>
</xsl:if>
</xsl:template>
<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml">
<!ENTITY toc.list.type SYSTEM "../params/toc.list.type.xml">
<!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml">
+<!ENTITY toc.max.depth SYSTEM "../params/toc.max.depth.xml">
<!ENTITY ulink.target SYSTEM "../params/ulink.target.xml">
<!ENTITY use.embed.for.svg SYSTEM "../params/use.embed.for.svg.xml">
<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml">
&manual.toc;
&toc.list.type;
&toc.section.depth;
+&toc.max.depth;
&generate.toc;
&generate.section.toc.level;
&generate.index;
<src:fragref linkend="textinsert.extension.frag"/>
<src:fragref linkend="toc.list.type.frag"/>
<src:fragref linkend="toc.section.depth.frag"/>
+<src:fragref linkend="toc.max.depth.frag"/>
<src:fragref linkend="ulink.target.frag"/>
<src:fragref linkend="use.embed.for.svg.frag"/>
<src:fragref linkend="use.extensions.frag"/>
--- /dev/null
+<refentry id="toc.max.depth">
+<refmeta>
+<refentrytitle>toc.max.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.max.depth</refname>
+<refpurpose>How maximaly deep should be each TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='toc.max.depth.frag'><xsl:param name="toc.max.depth">8</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the maximal depth of TOC on all levels.</para>
+
+</refsect1>
+</refentry>