[texhax] \hline in align environment

Sebastian Canagaratna s-canagaratna at onu.edu
Mon Jan 5 15:45:36 CET 2009


Hi:

   I posted yesterday to texhax my solution to the problem of drawing a
horizontal line at the bottom of two aligned simultaneous equations; I
had not been successful in finding any previous solution. It was this:

\begin{align*}
      4x+  6y -2z &= -4\\
       x -y +2z   &=  9\\[-0.2in]
    \underline{\phantom{4x+6y-2z}}&\underline{\phantom{y}}\underline{\phantom{-4y}}\\
       5x + 5y    &= 5\\
       \ x +\ y &= 1
\end{align*}

I appear to have solved this earlier by another, and I think, better
method.

I define a macro \und thus:
\def\und#1{\underline{\hbox to #1in{}}}

Here is an example using this:

\begin{align*}
  15x +3y &= 9\\
2x + 3y &= 8 \\[-0.18in]
\und{0.5}&\und{0.3}\\
17x \phantom{\ +0y}&=17\\
x&=1
\end{align*}
The vertical and horizontal spaces have to be determined experimentally.

Sebastian Canagaratna
Department of Chemistry and Biochemistry
Ohio Northern University
Ada, OH 45810



More information about the texhax mailing list