Aligning system of equations with zero coefficients
Like this answer.
\documentclass{article}
\usepackage{systeme}
\begin{document}
\sysdelim..\systeme{x_2 +2x_3 +2x_4 -2x_5 =1,
x_1 +3x_3 +4x_5 =5,
-x_1 +3x_2 +3x_3 -10x_5 =4}
\end{document}
For the sake of variety, here's an implementation that uses Mico's answer from the post you originally linked only using array
. Admittedly, it's not quite as elegant as the solution marmot provided. However, its output is exactly the same as what's produced by \systeme
. Observe that both answers produce output that's more tightly spaced than what's shown in the screenshot you posted. The array
-based solution is also somewhat more general than what's produced by \systeme
, in the sense that it can handle fairly arbitrary variable names.
\documentclass{article}
\usepackage{array} % for "\newcolumntype" macro
\newcolumntype{C}{ >{{}}c<{{}} }
\usepackage{systeme}
\sysdelim..
\begin{document}
\[
\setlength\arraycolsep{0pt}
\renewcommand{\arraystretch}{1.21} % optional
\begin{array}{r *{5}{Cr}}
& & x_2 &+& 2x_3 &+& 2x_4 &-& 2x_5 &=& 1 \\
x_1 & & &+& 3x_3 & & &+& 4x_5 &=& 5 \\
-x_1 &+& 3x_2 &+& 3x_3 & & &-& 10x_5 &=& 4
\end{array}
\]
%% for comparison, @marmot's answer which uses "\systeme"
\[
\systeme{ x_2 +2x_3 +2x_4 -2x_5 =1,
x_1 +3x_3 +4x_5 =5,
-x_1 +3x_2 +3x_3 -10x_5 =4}
\]
\end{document}