Skip to content

Align equations at equal sign

Davide P. Cervone edited this page May 26, 2013 · 3 revisions

From https://groups.google.com/d/msg/mathjax-users/x_cKEMVL240/o2K547Bktx4J


Is there a simple way to align equations at the equals sign? Its particularly useful when showing a derivation. There is some information here: http://www.w3.org/TR/MathML3/chapter3.html#type.group-align but it is not working for me and I was wondering if there is a MathJax specific write up.


There are still a number of MathML3 table features that are missing from MathJax, and the <maligngroup> and related <malignmark> are among them. For now, you will have to use <mtable> directly. If you are working from TeX, there are the AMSmath environments like \begin{align}...\end{align} that have already been mentioned. If you are producing MathML some other way, you will need to generate <mtable> elements like the following:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mtable columnalign="right left" columnspacing="0.28em" displaystyle="true">
    <mtr>
      <mtd>
        <mi>x</mi>
      </mtd>
      <mtd>
        <mo>=</mo>
        <mi>a</mi>
      </mtd>
    </mtr>
    <mtr>
      <mtd>
        <mi>y</mi>
      </mtd>
      <mtd>
        <mo>=</mo>
        <mi>b</mi>
      </mtd>
    </mtr>
  </mtable>
</math>

Hope that helps.

Davide

Clone this wiki locally