+<xsl:strip-space elements="ilustr"/>
+<xsl:template match="ilustr">
+ <cmd>
+ <xsl:attribute name="name">
+ <xsl:value-of select="wl:texcommand(name())" />
+ </xsl:attribute>
+ <xsl:if test="@opt">
+ <opt><TeXML ecape="0"><xsl:value-of select="normalize-space(@opt)" /></TeXML></opt>
+ </xsl:if>
+ <parm><TeXML escape="0"><xsl:value-of select="normalize-space(@src)" /></TeXML></parm>
+ <parm><xsl:apply-templates mode="inline" /></parm>
+ </cmd>
+</xsl:template>
+
+<xsl:template match="@*|node()" mode="identity">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="identity"/>
+ </xsl:copy>
+</xsl:template>
+
+
+
+<xsl:template match="dmath">
+ <dmath>
+ <xsl:apply-templates mode="identity"/>
+ </dmath>
+</xsl:template>
+
+<xsl:template match="math" mode="inline">
+ <math>
+ <xsl:apply-templates mode="identity"/>
+ </math>
+</xsl:template>
+
+<xsl:template match="latex">
+ <TeXML escape="0">
+ <xsl:for-each select="text()">
+ <xsl:value-of select="normalize-space(.)"/>
+ </xsl:for-each>
+ </TeXML>
+</xsl:template>
+
+<xsl:template match="latex" mode="inline">
+ <TeXML escape="0">
+ <xsl:for-each select="text()">
+ <xsl:value-of select="normalize-space(.)"/>
+ </xsl:for-each>
+ </TeXML>
+</xsl:template>
+
+<!-- TODO: this needs parameters, but we need to determine which
+ - cols: number of cols?
+ - first: is first column special?
+
+ -->
+<xsl:template match="tabela">
+ <cmd name="outmulticols"></cmd>
+ <cmd name="begin"><parm>tabela</parm> </cmd>
+ <xsl:apply-templates mode="tabela"/>
+ <cmd name="end"><parm>tabela</parm> </cmd>
+</xsl:template>
+
+<xsl:template match="r" mode="tabela">
+<!-- R<xsl:value-of select="count(preceding-sibling::*)" />-->
+ <xsl:choose>
+ <xsl:when test="count(preceding-sibling::*) = 0">
+ <cmd name="tabelanaglowek"><parm>
+ <xsl:apply-templates mode="tabelanaglowek"/>
+ </parm></cmd>
+ </xsl:when>
+ <xsl:otherwise>
+ <cmd name="tabelawiersz"><parm>
+ <xsl:apply-templates mode="tabelawiersz"/>
+ </parm></cmd>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="c" mode="tabelanaglowek">
+ <xsl:if test="count(preceding-sibling::*) > 0"><spec cat="align"/></xsl:if>
+ <cmd name="tabelakomnaglowek"><parm>
+ <xsl:apply-templates mode="inline"/>
+ </parm></cmd>
+</xsl:template>
+
+<xsl:template match="c" mode="tabelawiersz">
+
+ <xsl:choose>
+ <xsl:when test="count(preceding-sibling::*) = 0">
+ <cmd name="tabelakompierwsza"><parm>
+ <xsl:apply-templates mode="inline"/>
+ </parm></cmd>
+ </xsl:when>
+ <xsl:otherwise>
+ <spec cat="align"/><cmd name="tabelakom"><parm>
+ <xsl:apply-templates mode="inline"/>
+ </parm></cmd>
+ </xsl:otherwise>
+ </xsl:choose>
+</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() < last()-1">
+ <spec cat="align"/>
+ </xsl:if>
+</xsl:template>
+<xsl:template match="hr">
+ <cmd name="hline"/>
+</xsl:template>