[OS X TeX] Aligning equations with comments

David Arnold dwarnold45 at suddenlink.net
Fri Mar 18 22:19:57 CET 2011


All,

Think I have it:

$$ 
\begin{array}{rrrrr>{\hspace{1cm}}p{7cm}}
2x & + & 5y & = & 6 & \textcolor{red}{Now is the time for all good men.}\\
3x & - & 4y & = & 12 & \textcolor{red}{Dark are the days}.\\\cmidrule{1-5}
\end{array}
$$

But I am still open to suggestion. Think this will work for me.

D.



On Mar 18, 2011, at 2:13 PM, David Arnold wrote:

> I've got something that almost works:
> 
> $$ 
> \begin{array}{rrrrrp{6cm}}
> 2x & + & 5y & = & 6 & \textcolor{red}{Now is the time for all good men.}\\
> 3x & - & 4y & = & 12 & \textcolor{red}{Dark are the days}.\\\cline{1-5}
> \end{array}
> $$
> 
> But when I try to separate the text from the math, my underline extends as well.
> 
> $$ 
> \begin{array}{rrrrr@{\hspace{1cm}}p{6cm}}
> 2x & + & 5y & = & 6 & \textcolor{red}{Now is the time for all good men.}\\
> 3x & - & 4y & = & 12 & \textcolor{red}{Dark are the days}.\\\cline{1-5}
> \end{array}
> $$
> 
> Anyone have a solution where I get get my underline to stop just after the 12?
> 
> D.
> 
> 
> 
> On Mar 18, 2011, at 1:26 PM, <leedwitt at gmail.com> wrote:
> 
>> I need to align x-terms, operator, y-terms, equal sign, and right-hand sides in their own columns, while keeping my comment space to the right. I also need to underline that second equation before writing that third equation.
>> ++++++++++++++
>> 
>> I've used hphantom commands to align x and y values before (one equation has 3x, use hphantom{3}x in the next line. Same thing for negatives to align right sides. 
>> 
>> I have no idea about the underlining. 
>> Sent from my Verizon Wireless BlackBerry
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>> 
> 
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> 




More information about the macostex-archives mailing list