0

I've seen the post on aligning a system of equations with systeme and array; is there a way to do something similar with alignedat?

I am using KaTeX and it has array (but without arraycolsep support at present) and align and alignedat. I can get pretty close to what I want with alignedat, but I don't understand how it works.

Page 8 of the amsmath user's guide mentions alignat and there's a later reference to alignedat with no explanation of how it differs from alignat... can anyone help?

Here is a sample document I am using to help understand.

\documentclass{article}
\usepackage{systeme, array, amsmath}

\begin{document} \systeme*{ X_\alpha=\frac{2}{3}X_A - \frac{1}{3}X_B- \frac{1}{3}X_C, X_\beta=\frac{1}{\sqrt{3}}X_B - \frac{1}{\sqrt{3}}X_C }

\par

This is the best I can do within LaTeX:

[ \setlength\arraycolsep{0pt} \begin{array}{ r @{{}={}} r >{{}}c<{{}} cr >{{}}c<{{}} cr } X_\alpha &\frac{2}{3}X_A &-& \frac{1}{3}&X_B &-& \frac{1}{3}&X_C \[2pt] X_\beta & & &\frac{1}{\sqrt{3}}&X_B &-& \frac{1}{\sqrt{3}}&X_C \end{array} ]

With no arraycolsep:

[ \begin{array}{ r @{{}={}} r >{{}}c<{{}} cr >{{}}c<{{}} cr } X_\alpha &\frac{2}{3}X_A &-& \frac{1}{3}&X_B &-& \frac{1}{3}&X_C \[2pt] X_\beta & & &\frac{1}{\sqrt{3}}&X_B &-& \frac{1}{\sqrt{3}}&X_C \end{array} ]

Alignedat:

[ \begin{alignedat}{4} X_\alpha &=\frac{2}{3}X_A &-& \frac{1}{3}X_B &- \frac{1}{3}&X_C \ X_\beta &= && \frac{1}{\sqrt{3}}X_B &- \frac{1}{\sqrt{3}}&X_C \end{alignedat} ]

\end{document}

enter image description here

Jason S
  • 2,838

0 Answers0