# Multiple Alignment in MathJax

What's the code for multiple alignment in MathJAX? An analogous question for Latex is at https://tex.stackexchange.com/questions/43464/multiple-alignment-in-equations, but it doesn't appear to function here. Thank you.

Objective:
$A = B$
$\qquad B = C$
$\qquad \qquad C = D$
$\qquad \qquad \qquad E = F$

Attempt: \begin{align*} A = B\\\ &B = C\\\ &&C =D\\\ &&&E= F \end{align*}

Code for Attempt: \begin{align*} A = B\\\ &B = C\\\ &&C =D\\\ &&&E= F \end{align*}

Another option is to abuse the alignat environment.

\newcommand{\myeqa}{=} \begin{alignat}{5} A & \myeqa & B \\ & & B & \myeqa & C \\ & & & & C & \myeqa & D \\ & & & & & & D & \myeqa & E \end{alignat}


To adjust spacing you can put spacing commands on either side of the equals sign, such as \newcommand{\myeqa}{~=~} instead to get some more spacing.

\newcommand{\myeqa}{=} \begin{alignat}{5} A & \myeqa & B \\ & & B & \myeqa & C \\ & & & & C & \myeqa & D \\ & & & & & & D & \myeqa & E \end{alignat}

This is pretty hack-ish, but

$$\newcommand{\myeq}{\!\!=\!\!} \begin{array}{ccccccccc} A & \myeq & B \\ & & B & \myeq & C \\ & & & & C & \myeq & D \\ & & & & & & D & \myeq & E \end{array}$$


produces

$$\newcommand{\myeq}{\!\!=\!\!} \begin{array}{ccccccccc} A & \myeq & B \\ & & B & \myeq & C \\ & & & & C & \myeq & D \\ & & & & & & D & \myeq & E \end{array}$$ Is that like what you want?

• Pretty doesn't come close to how hack-ish this is.
– Asaf Karagila Mod
Nov 8, 2013 at 9:44
• +1. Many thanks. Yes. Is there a way to lessen the space between the equal sign and the letters?
– user53259
Nov 8, 2013 at 9:52