nicer tables
[librarian.git] / librarian / pdf / wl2tex.xslt
index f9b7ab0..0f1d51f 100644 (file)
   </math>
 </xsl:template>
 
+<xsl:template match="tablewrap">
+  <cmd name="begin"><parm>table</parm><opt>h!</opt></cmd>
+  <xsl:apply-templates select="table"/>
 
+  <cmd name="caption*"><parm>
+    <xsl:apply-templates select="akap"/>
+  </parm></cmd>
+  <cmd name="end"><parm>table</parm></cmd>
+</xsl:template>
+
+<xsl:template match="table">
+  <xsl:if test="@caption">
+
+      <cmd name="caption*"><parm>
+
+       <cmd name="Large"/><xsl:value-of select="@caption"/>
+      </parm></cmd>
+    </xsl:if>
+    <env name="tabularx">
+      <parm><cmd name="textwidth"/></parm>
+        <parm><xsl:value-of select="@spec"/></parm>
+        <xsl:apply-templates />
+    </env>
+</xsl:template>
+
+<xsl:template match="r">
+    <xsl:apply-templates />
+    <spec cat="esc"/><spec cat="esc"/>
+</xsl:template>
+<xsl:template match="c">
+    <cmd name="footnotesize"/>
+    <xsl:apply-templates mode="inline"/>
+    <xsl:if test="position() &lt; last()-1">
+    <spec cat="align"/>
+    </xsl:if>
+</xsl:template>
+<xsl:template match="hr">
+  <cmd name="hline"/>
+</xsl:template>
 
 <!-- ================ -->
 <!-- = SPECIAL TAGS = -->