Skip to content

Commit

Permalink
use aligned for align environments in tables
Browse files Browse the repository at this point in the history
  • Loading branch information
mkraetke committed Jan 23, 2016
1 parent b009fcd commit f775b79
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xsl/evolve-hub-driver.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,15 @@
<xsl:for-each-group select="node()" group-adjacent="local-name() eq 'equation'">
<xsl:choose>
<xsl:when test="current-grouping-key() eq true() and count(current-group()) gt 1">
<xsl:variable name="texname" select="if(@role eq 'numbered') then 'align' else 'align*'"/>
<xsl:processing-instruction name="latex" select="concat('\begin{', $texname, '}&#xa;')"/>
<xsl:variable name="texname" select="if(ancestor::table or ancestor::informaltable)
then 'aligned'
else if(@role eq 'numbered') then 'align' else 'align*'" as="xs:string"/>
<xsl:processing-instruction name="latex" select="concat(if(ancestor::table or ancestor::informaltable) then '{$' else '', '\begin{', $texname, '}&#xa;')"/>
<xsl:for-each select="current-group()">
<xsl:apply-templates mode="docx2tex-alignment"/><xsl:text>&#x20;</xsl:text><xsl:processing-instruction name="latex" select="if(position() ne last()) then '\\&#xa;' else '&#xa;'"/>
</xsl:for-each>
<xsl:text>&#xa;</xsl:text>
<xsl:processing-instruction name="latex" select="concat('\end{', $texname, '}')"/>
<xsl:processing-instruction name="latex" select="concat('\end{', $texname, '}', if(ancestor::table or ancestor::informaltable) then '$}' else '')"/>
<xsl:text>&#xa;&#xa;</xsl:text>
</xsl:when>
<xsl:otherwise>
Expand Down

0 comments on commit f775b79

Please sign in to comment.