[texhax] hline or underline in align environment
E. Krishnan
ekmath at asianetindia.com
Tue May 3 03:41:58 CEST 2005
On Sun, 1 May 2005, John Wheeler wrote:
> I'm using the align environment (having gratefully graduated from eqnarray
> at the suggestion of this group) and need to be able to put an underline
> beneath one equation before proceeding to the next, as in adding two
> equations to obtain a third.
Two possible solutions might be
1. \usepackage{amsmath}
\begin{equation*}
\renewcommand{\arraystretch}{1.1}
\addtolength{\arraycolsep}{-3.5pt}
\begin{matrix}
2x^2 & - & 3x & + & 4\\
& & 2x & + & 1\\
\hline
2x^2 & - & x & + & 5
\end{matrix}
\end{equation*}
2. \usepackage{array}
\newcolumntype{M}{>{$}c<{$}}
{\renewcommand{\arraystretch}{1.1}
\begin{tabular}{*{5}{@{\:}M}}
2x^2 & - & 3x & + & 4\\
& & 2x & + & 1\\
\hline
2x^2 & - & x & + & 5
\end{tabular}}
--
Krishnan
More information about the texhax
mailing list