10

I'm a middle school maths teacher trying to teach equations to my students. One advice I give them is to try and think of each number as if they were in a "column" of their own, so it's clearer to them where each number goes. Here's an example of the result I desire:

What i want to get

I've managed to get this using the tabular environment, but it's obviously not the right way to do this. Using the align environment doesn't work because the second ampersand will signify a new equation, and will leave a lot of undesired blank space. Does someone have an idea of how I could properly manage this ?

  • Why did you use two ampersands? – Bernard Sep 22 at 10:58
  • 2
    Shouldn't the 'x' in the last equation be one column to the right to ensure proper alignment? – PolyaPal Sep 23 at 19:19
11

The systeme package allows you to do this. The command \sysdelim.. is used here to remove the braces that are placed by default.

screenshot

\documentclass{article}
\usepackage{systeme}
\begin{document}
\sysdelim..\systeme{4x+7=7x+2,7=3x+2,5=3x,\frac{5}{3}=x
}
\end{document}
11

You wrote,

I've managed to get this using the tabular environment, but it's obviously not the right way to do this.

You were actually quite close! The main change I'd recommend you make is switching from a tabular environment to an array environment. The following screenshot shows the effect of this change. The third "take" involves applying further tweaks -- at which point the output will be indistinguishable from what's produced by systeme.

enter image description here

\documentclass{article}
\usepackage{array,systeme}
\newcolumntype{C}{>{{}}c<{{}}} % for "Take 3" (see below)
\begin{document}

Take 1: OP's original form
\[
\begin{tabular}{rcrclcl}
4x & + & 7 & = & 7x & + & 2 \\
   &   & 7 & = & 3x & + & 2 \\
   &   & 5 & = & 3x \\
&&$\frac{5}{3}$ & = & x 
\end{tabular}
\]

\medskip
Take 2: \texttt{array} env.\ instead of \texttt{tabular} env.
\[
\begin{array}{rcrclcl}
4x & + & 7 & = & 7x & + & 2 \\
   &   & 7 & = & 3x & + & 2 \\
   &   & 5 & = & 3x \\
&&\frac{5}{3} & = & x 
\end{array}
\]

\medskip
Take 3: \texttt{array} env., \texttt{C} col.\ type, \texttt{\string\arraycolsep=0pt}
\[
\arraycolsep=0pt
\renewcommand\arraystretch{1.245}
\begin{array}{rCrClCl}
4x & + & 7 & = & 7x & + & 2 \\
   &   & 7 & = & 3x & + & 2 \\
   &   & 5 & = & 3x \\
&&\frac{5}{3} & = & x 
\end{array}
\]

\medskip
Take 4: \texttt{systeme} solution
\[
\sysdelim..
\systeme{4x+7=7x+2,7=3x+2,5=3x,\frac{5}{3}=x}
\]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.