- Fixed a bug where the last row of a tabular-header had no \\.
1 parent 19fd7c8 commit 00f046c91782fcf621d81f020583059396a48f1c
nstanger authored on 20 Jun 2012
Showing 1 changed file
View
21
modules/tabular.xml
-->
<template name="row" match="row">
<common formats="/latex/xelatex/">
<xsl:apply-templates />
<xsl:if test="not( position() = last() )">
<xsl:text> \\</xsl:text>
</xsl:if>
<xsl:text> \\</xsl:text>
<xsl:if test="@no-page-break = 'yes'"><xsl:text>*</xsl:text></xsl:if>
<xsl:text> </xsl:text>
</common>
<common formats="/html/xhtml/">
</tr>
</common>
</template>
<!--
The last row of a tabular in (Xe)LaTeX shouldn't have a \\ at the end (it still works, but I think you end up with too much white space after the tabular).
Case 1: There's no tabular-footer, so apply this to the last row of the tabular-body.
Case 2: Last row of the tabular-footer, if it exists.
-->
<template name="last-row-body" match="tabular-body/row[( position() = last() ) and not( ../following-sibling::tabular-footer )]|tabular-footer/row[position() = last()]">
<common formats="/latex/xelatex/">
<xsl:apply-templates />
<xsl:text> </xsl:text>
</common>
<common formats="/html/xhtml/">
<xsl:call-template name="row" />
</common>
</template>
<!--
Horizontal rules (LaTeX only).