Next: , Previous: MathML in tbook, Up: Almost LaTeX formulae



5.2.1 Equation arrays

tbook treats a <math> element as an equation array, if it consists of only one <mtable>, with a groupalign attribute or one or more <mlabeledtr> rows. If you set groupalign="right center left", this leads to an eqnarray in LaTeX, and where `&' are in LaTeX, you have to use <maligngroup/> in MathML. Else the equations are just stacked and not aligned.

But as already mentioned, you can also use <m> inside <math>, which is very helpful for equation arrays.

If you use these elements within a MathML equation array, you can generate alignment markers (in LaTeX known as `&' signs) with `#' signs1. Put them where they would be in LaTeX. Although MathML requires such a marker at the very beginning of an equation row, this is not true for LaTeX, and not true for tbook.

Here is an example:2

<math>
  <mtable groupalign="right center left">
    <mtr>
      <mtd id="test"> <m> 1+1 #=# 2 </m> </mtd>
      <mtd> <m> 4 #=# 2 &CenterDot; 2 </m> </mtd>
    </mtr>
  </mtable>
</math>

which is the same as LaTeX's

\begin{eqnarray}
  1+1 &=& 2 \label{Test} \\
  4   &=& 2 \cdot 2 \nonumber \\
\end{eqnarray}

and you don't want to see the HTML/MathML output tbook must create for that.

(By the way, being the only child element of an <mtd>, <m> is implicitly surrounded by an <mrow> which is necessary in this context.)


Footnotes

[1] because this is shorter than &amp;

[2] Actually both <mtd>s should be in different <mtr>s according to the MathML specification. You may do this, but it is just additional typing, since it doesn't matter for tbook. However the MathML that tbook produces is absolutely free of such sloppyness.