Skip to content

Commit

Permalink
added table caption and internal links to tables to review-to-pdf-scr…
Browse files Browse the repository at this point in the history
…ipt; made table font size for pdf smaller
  • Loading branch information
hennyu committed Feb 16, 2025
1 parent a6ca255 commit e0dcfc1
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tei2pdf/review-to-pdf.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,19 @@ table, td, tr, th {
</xsl:template>

<xsl:template match="body//table/head">
<caption><xsl:apply-templates/></caption>
<caption>
<xsl:choose>
<xsl:when test="$lang='de'">
<xsl:text>Tabelle </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Tab. </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="parent::table/@xml:id/substring-after(.,'table')"/>
<xsl:if test=". != ''"><xsl:text>: </xsl:text></xsl:if>
<xsl:apply-templates/>
</caption>
</xsl:template>

<xsl:template match="body//p | back//p">
Expand Down Expand Up @@ -649,7 +661,10 @@ table, td, tr, th {

<!-- tables -->
<xsl:template match="table">
<table>
<table style="font-size: 80%;">
<xsl:if test="@xml:id">
<xsl:attribute name="id" select="@xml:id"/>
</xsl:if>
<xsl:apply-templates/>
</table>
</xsl:template>
Expand Down

0 comments on commit e0dcfc1

Please sign in to comment.