Fixes to automatically break long tables over multiple pages so no text is lost in PDF versions. Imported tabu LaTeX package; it's not available on debian stable.

Tobias Markmann 2012-05-31 09:28:48 +02:00
parent e058190960
commit af2e1bee4f
3 changed files with 2562 additions and 2 deletions

deps/tabu.sty vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -370,6 +370,7 @@ def main(argv):
executeCommand("mkdir /tmp/xepbuilder")
executeCommand("cp ../images/xmpp.pdf /tmp/xepbuilder/xmpp.pdf")
executeCommand("cp ../images/xmpp-text.pdf /tmp/xepbuilder/xmpp-text.pdf")
executeCommand("cp deps/tabu.sty /tmp/xepbuilder/tabu.sty")
executeCommand("cp xep.ent /tmp/xep.ent")

View File

@ -85,7 +85,8 @@
@ -242,13 +243,14 @@
<xsl:template match='table'>
<TeXML escape="0">
<env name="center">
<env name='tabularx'><parm><TeXML escape="0">\linewidth</TeXML></parm>
<env name='longtabu'>
<parm><xsl:for-each select='tr[1]/th | tr[1]/td'><xsl:if test="position() = 1">l</xsl:if><xsl:if test='position() != last() and position() > 1'>X</xsl:if><xsl:if test='position() = last()'>X</xsl:if></xsl:for-each></parm>
<xsl:for-each select='tr'>
<xsl:for-each select='td | th'><xsl:if test='position() > 1'> &amp; </xsl:if><TeXML escape="1"><xsl:value-of select='.'/></TeXML><xsl:if test='position() = last()'> \\</xsl:if></xsl:for-each>
<xsl:if test="position() = 1">