## LaTeX forum ⇒ Math & Science ⇒ “array” most efficient code for creating step-by-step solution procedures for single variable Alg equations?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
WyoTeacher
Posts: 3
Joined: Wed Apr 22, 2020 6:55 am

### “array” most efficient code for creating step-by-step solution procedures for single variable Alg equations?

Greetings LaTeX Community!

I need to create step-by-step procedure solutions to share with my high school students.

Is "array" the most efficient method of creating these columnar style procedure steps?

The MWE works but is quite time intensive. (h/t to the good folks at overleaf.com for providing basic code shown below)

\documentclass{article}\usepackage{amsmath,array}\usepackage{cancel}\newenvironment{system}{\renewcommand{\arraystretch}{1.5}% like aligned does \begin{array}{ @{}r@{} *{\value{MaxMatrixCols}}{ >{{}}c<{{}}@{} >{\mathopen{}}r@{} } }%}{\end{array}}\begin{document}$\begin{system}& -\frac {1}{5}x & + \cancel{7} & = & 3 & + & \frac {4}{5} x\\& & -\cancel{7} & & -7 & \\ \hline\bigskip& - \frac {1}{5}x & & = & -4 & + & \frac{4}{5} x \\& \frac{1}{5} x & & = & -4 & + & \frac{4}{5}x \\& \frac{1}{5}x & & = & & & + \frac{1}{5}x \\ \hline& 0 &&= && & + \frac{5}{5}x\\\&0&&=&&1x\\\&x&&=&&0\end{system}$\end{document}