1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-03 06:22:16 -05:00

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.

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

2557
deps/tabu.sty vendored Normal file

File diff suppressed because it is too large Load Diff

1
gen.py
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")
files_to_delete.append("/tmp/xep.ent")

View File

@ -85,7 +85,8 @@
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{tabu}
\usepackage{longtable}
\usepackage{listings}
\usepackage{varwidth}
\usepackage{titling}
@ -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">
\hline
\hline
\endhead
</xsl:if>
</xsl:for-each>
</env>