Skip to content

Commit

Permalink
fix issue #63 XHTML generate.toc no suppress part toc title
Browse files Browse the repository at this point in the history
  • Loading branch information
bobstayton committed Jul 12, 2018
1 parent 5763e99 commit acc2fad
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 14 additions & 4 deletions xsl/html/division.xsl
Expand Up @@ -118,18 +118,26 @@
</xsl:call-template>
</xsl:variable>
<xsl:if test="not(d:partintro) and contains($toc.params, 'toc')">
<xsl:call-template name="division.toc"/>
<xsl:call-template name="division.toc">
<xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
</div>
</xsl:template>

<xsl:template match="d:part" mode="make.part.toc">
<xsl:call-template name="division.toc"/>
<xsl:param name="toc.title.p" select="true()"/>
<xsl:call-template name="division.toc">
<xsl:with-param name="toc.title.p" select="$toc.title.p"/>
</xsl:call-template>
</xsl:template>

<xsl:template match="d:reference" mode="make.part.toc">
<xsl:call-template name="division.toc"/>
<xsl:param name="toc.title.p" select="true()"/>
<xsl:call-template name="division.toc">
<xsl:with-param name="toc.title.p" select="$toc.title.p"/>
</xsl:call-template>
</xsl:template>

<xsl:template match="d:part/d:docinfo"></xsl:template>
Expand Down Expand Up @@ -159,7 +167,9 @@
</xsl:variable>
<xsl:if test="contains($toc.params, 'toc')">
<!-- not ancestor::part because partintro appears in reference -->
<xsl:apply-templates select="parent::*" mode="make.part.toc"/>
<xsl:apply-templates select="parent::*" mode="make.part.toc">
<xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
</xsl:apply-templates>
</xsl:if>
<xsl:call-template name="process.footnotes"/>
</div>
Expand Down
4 changes: 3 additions & 1 deletion xsl/html/refentry.xsl
Expand Up @@ -34,7 +34,9 @@
</xsl:variable>

<xsl:if test="not(d:partintro) and contains($toc.params, 'toc')">
<xsl:call-template name="division.toc"/>
<xsl:call-template name="division.toc">
<xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
</div>
Expand Down

0 comments on commit acc2fad

Please sign in to comment.