diff --git a/modules/maths.xml b/modules/maths.xml index 57b365d..19061d2 100644 --- a/modules/maths.xml +++ b/modules/maths.xml @@ -39,10 +39,10 @@ <template name="equation-array" match="equation-array"> <common formats="/latex/xelatex/"> - <xsl:text>\begin{eqnarray*}</xsl:text> + <xsl:text>\begin{displaymath}\begin{split}</xsl:text> <xsl:call-template name="newline-internal" /> <xsl:apply-templates /> - <xsl:text>\end{eqnarray*}</xsl:text> + <xsl:text>\end{split}\end{displaymath}</xsl:text> </common> <common formats="/html/xhtml/"> <table class="equation" border="0" style="margin-left: auto; margin-right: auto;"> @@ -52,19 +52,17 @@ </template> <!-- - Hmm, LaTeX uses "&" as separators: how do we know if there's another cell coming? Ah, but the LaTeX eqnarray can have no more than three columns, so there's no need to generalise. + Hmm, LaTeX uses "&" as separators: how do we know if there's another cell coming? Ah, but the AMS split has only two column plus an optional operator at the alignment point, so there's no need to generalise. --> <template match="equation-array/row"> <common formats="/latex/xelatex/"> <xsl:apply-templates select="left" /> + <!-- Fortunately, white space after the "&" doesn't affect alignment. --> <xsl:text disable-output-escaping="yes"> & </xsl:text> <xsl:apply-templates select="middle" /> - <xsl:text disable-output-escaping="yes"> & </xsl:text> <xsl:apply-templates select="right" /> <xsl:text> \\</xsl:text> <xsl:call-template name="newline-internal" /> - <xsl:text>\\</xsl:text> - <xsl:call-template name="newline-internal" /> </common> <common formats="/html/xhtml/"> <tr>