You can try the package systeme. Its documentation is in French, but there are many examples to play with.
Your example would be input as
\systeme{
2x + y + 3z = 10,
x + y + z = 6,
x + 3y + 2z = 13}
To get right alignment in the column of right hand sides, one has to manually modify the package code:
\makeatletter
\def\SYS@makesyspreamble@i#1{%
\ifnum#1<\SYS@preamblenum
\SYS@addtotok\SYS@systempreamble{\hfil$##$&\hfil$##$&}%
\expandafter\SYS@makesyspreamble@i\expandafter{\number\numexpr#1+\@ne\expandafter}%
\else
\SYS@addtotok\SYS@systempreamble{\hfil$##$&$##$&\hfil$##$\null}%
\ifSYS@extracol
\SYS@addtotok\SYS@systempreamble{&\SYS@extracolstart##\SYS@extracolend\hfil\null}%
\fi
\SYS@addtotok\SYS@systempreamble{\cr\SYS@strutup}%
\fi
}
\makeatother
The patch is simply changing $##$\hfil
into \hfil$##$
but, since this involves #
it's not possible to use etoolbox's \patchcmd
.
One can modify the distance between the lines by saying something like
\syslineskipcoeff{1.2}
and act on the column spacing with the parameter \tabskip
; so, for example,
\[
\syslineskipcoeff{1.2}\setlength{\tabskip}{3pt}
\systeme{
2x + y + 3z = 10,
x + y + z = 6,
x + 3y + 2z = 13}
\]
will spread out the equations both vertically and horizontally. The \syslineskipcoeff
can also be issued globally, in the preamble of the document; not the horizontal spacing, though, as \tabskip
influences all TeX tables, tabular
environments included.
I only considered implementing a global alignment as egreg hinted in comments that it was a bad idea. Alignment is supposed to highlight the corresponding parts of a display and that meaning is destroyed if you align everything. But...
\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{etoolbox}
\setlength\mathindent{3cm}
\makeatletter
\def\align@preamble{%
&\hfil
\strut@
\setboxz@h{\@lign$\m@th\displaystyle{##}$}%
\ifmeasuring@\savefieldlength@\fi
\llap{\set@field}%
\tabskip\z@skip
&\setboxz@h{\@lign$\m@th\displaystyle{{}##}$}%
\ifmeasuring@\savefieldlength@\fi
\rlap{\set@field}
\hfil
\tabskip\alignsep@
}
\def\a{One two three four five six seven. }
\def\b{\a\a\a Red yellow blue green. \a\a\a\a}
\begin{document}
\b\b\a
\begin{align}
1+2+3+4 &=4\\
x+y &=z
\end{align}
\b\b\b
\a\a\b
\a
\begin{align}
1&=a+y+b+w+x+n+m+s+d+e\\
2&=4
\end{align}
\b
\begin{align}
1&=0\\
2&=9
\end{align}
\end{document}
the macros here are not particularly general or robust but show a basic idea of using a flush left but very indented setting along with hiding the width of the first column.
Best Answer
Still another solution, which employs five side-by-side
array
environments.