Skip to content

Commit

Permalink
Large print: Handle hd inside linegroups and poems gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
egli committed Sep 28, 2022
1 parent e085da0 commit 224a489
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions transformers/se_tpb_dtbook2latex/dtbook2latex_common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,10 @@
<xsl:text>\end{tcolorbox}&#10;</xsl:text>
</xsl:template>

<xsl:template match="dtb:sidebar/dtb:hd">
<!-- Headings inside sidebars and linegroups aren't real headings in
the sense that they contribute to the hierarchy and need to be
in the toc. Simply make them stand out by making them bold -->
<xsl:template match="dtb:sidebar/dtb:hd|dtb:linegroup/dtb:hd">
<xsl:text>\textbf{</xsl:text>
<xsl:apply-templates/>
<xsl:text>}&#10;&#10;</xsl:text>
Expand All @@ -1135,6 +1138,9 @@
<xsl:text>}&#10;</xsl:text>
</xsl:template>

<!-- Headings inside lists aren't real headings in the sense that
they contribute to the hierarchy and need to be in the toc.
Simply make them stand out by making them bold -->
<xsl:template match="dtb:list/dtb:hd">
<xsl:text>\item \textbf{</xsl:text>
<xsl:apply-templates/>
Expand Down Expand Up @@ -1318,7 +1324,7 @@
<xsl:text>&#10;</xsl:text>
</xsl:template>

<xsl:template match="dtb:poem/dtb:title">
<xsl:template match="dtb:poem/dtb:title|dtb:poem/dtb:hd">
<xsl:text>\PoemTitle*[]{</xsl:text>
<xsl:apply-templates/>
<xsl:text>}&#10;</xsl:text>
Expand Down

0 comments on commit 224a489

Please sign in to comment.