I'm writing some notes on linear algebra and to ease my work I've decided to use the systeme
package. When I discovered that systeme has no built-in feature of writing systems of equations with dots and non-numeric coefficients, I've decided to use the fix suggested in this answer.
I need to write the full process of row-reduction of a specific system of equations, and I've done it before using the cases environment inside an align* environment. But the cases environment won't align the coefficients as desired, although each system is just where I wanted it to be. The fix suggested in this post yields an error when used inside the align* environment. What can I do?
A test sample for the error:
\documentclass{article}
\usepackage{amsmath}
\usepackage{xstring}
\def\typesystem#1{%
\begingroup\expandarg
\baselineskip=1.5\baselineskip% 1.5 to enlarge vertical space between lines
\StrSubstitute{\noexpand#1}+{&+&}[\tempsystem]%
\StrSubstitute\tempsystem={&=&}[\tempsystem]%
\StrSubstitute\tempsystem,{\noexpand\cr}[\tempsystem]%
\vcenter{\halign{&$\hfil\strut##$&${}##{}$\cr\tempsystem\crcr}}%
\endgroup
}
\begin{document}
\begin{align*}
\left\{\typesystem{3x + 2y = 1, x - 3y = 2}\right.
\end{align*}
\end{document}
It yields:
! Argument of \@xs@next has an extra }.
<inserted text>
\par
l.20 \end{align*}
My situation in which each system is where it's desired but the coefficients inside them are not aligned (using align* and cases):
x_1
on the left side should end at the same horizontal point (and similarly within the cases on the right-hand side), or a combination of all these things? or something else? i'm thinking thatalignat*
might be more appropriate here, at least with regard to the three cases on the right-hand side.