Wie kann man Textgruppen in Spalten mit Unterzeile ausrichten?

Wie kann man Textgruppen in Spalten mit Unterzeile ausrichten?

Bildbeschreibung hier eingeben
Ich möchte Texte in Spalten mit Unterzeilen ausrichten, wie oben. Welchen Code muss ich dafür verwenden?

\documentclass{article}  
\begin{document}  
%what should I add?  
\end{document}

Antwort1

Als Ausgangspunkt:

\documentclass{standalone}

\usepackage{mathtools,array,booktabs}
\mathtoolsset{showonlyrefs}

\newcolumntype{D}{>{$}r<{$}} % Description
\newcolumntype{E}{D<{={}}@{}D} % Equation

\begin{document}
\begin{tabular}{DEDE}
  4 \cdot [\text{equation 3}] & 4x_3 & -4                  & -1 \cdot [\text{equation 3}] & -x_3 & 1 \\
  {}+ [\text{equation 2}]     & x_2 - 4x_3 & 4             & {}+ [\text{equation 1}]      & x_1 - 2x_2 + x_3 & 0 \\
  \cmidrule(lr){1-1}            \cmidrule(lr){2-3}           \cmidrule(lr){4-4}             \cmidrule(lr){5-6}
  [\text{new equation 2}]     & x_2 \hphantom{{}-4x_3} & 0 & [\text{new equation 1}]      & x_1 - 2x_2 \hphantom{{}+x_3} & 0
\end{tabular}
\end{document}

Was dazu führt:

Bildbeschreibung hier eingeben

Antwort2

Sie können die tabellarische Umgebung verwenden:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage{array}
\usepackage[margin={1cm,1cm}]{geometry}

\begin{document}

\begin{tabular}{@{}r@{}}
  4.[equation3] \\
  + [equation2] \\
   \hline
   [new equation2]\\
\end{tabular}
\hfill
\begin{tabular}{@{}rcr@{=}r@{}}
        &     & $4x_3$ & $-4$ \\
  $x_2$ & $-$ & $4x_3$ & $4$  \\
   \hline
  $x_2$ &     &        & 0    \\
\end{tabular}    
\hfill
\begin{tabular}{@{}r@{}}
  -1.[equation3] \\
  + [equation1] \\
   \hline
   [new equation1]\\
\end{tabular}    
\hfill
\begin{tabular}{@{}rrrrr@{=}r@{}}
        &   &        &   & $-x_3$ & $1$ \\
  $x_1$ & - & $2x_2$ & + & $x_3$  & $0$ \\
   \hline
  $x_1$ & - & $2x_2$ &   &        & $1$ \\
\end{tabular}    
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen