# [OS X TeX] Item align

Wed Jun 22 01:47:44 CEST 2011

Michael,

Thanks. I went with Ross's strategy:

% Exercise #7
\begin{exercise}\label{ex:4-1-7}
\hspace{.5cm}\lower0.65\baselineskip\hbox{\begin{aligned} 3x-3y&=12\\ x-y&=-3 \end{aligned}}

I was able to use our perl code section to do something like this, where the second equation has the form y=slope2 * x+b.

my $howmuch=isinteger($slope2) ? "0.65" : "1.0";

Then code our question like this:

\shortqu=\hspace{.5cm}\lower#howmuch\baselineskip\hbox{\begin{aligned} #eqn1&=#C\\ y&=#eqn2 \end{aligned}}
|@|

The result is not bad. See exercises 7-18 on page 4 of:

http://msenux.redwoods.edu/ElemAlgText/chapter4/chapter4.pdf

David.

On Jun 21, 2011, at 4:28 PM, Michael Sharpe wrote:

>
> On Jun 21, 2011, at 3:34 PM, David Arnold wrote:
>
>> Michael,
>>
>> Not bad, but in this case the baseline of the first equations winds up atop the baseline of the item number.
>>
>> \documentclass{article}
>> \usepackage{amsmath}
>> \begin{document}
>>
>> \begin{enumerate}
>>
>> \item
>> \begin{minipage}{2in}\begin{align*}
>> 2x+3y&=4\\
>> y&=\frac23x-4
>> \end{align*}
>> \end{minipage}
>> \end{enumerate}
>> \end{document}
>>
>> D.
>>
>> On Jun 21, 2011, at 3:27 PM, Michael Sharpe wrote:
>>
>>>
>>> On Jun 21, 2011, at 3:12 PM, David Arnold wrote:
>>>
>>>> \documentclass{article}
>>>> \usepackage{amsmath}
>>>> \begin{document}
>>>>
>>>> \begin{enumerate}
>>>>
>>>> \item
>>>> \begin{align*}
>>>> 2x+3y&=4\\
>>>> 3x-4y&=12
>>>> \end{align*}
>>>>
>>>> \end{enumerate}
>>>> \end{document}
>>>
>>> You can put the align material inside a minipage, Eg,
>>>
>>> \documentclass{article}
>>> \usepackage{amsmath}
>>> \begin{document}
>>>
>>> \begin{enumerate}
>>>
>>> \item
>>> \begin{minipage}{2in}\begin{align*}
>>> 2x+3y&=4\\
>>> 3x-4y&=12
>>> \end{align*}
>>> \end{minipage}
>>> \end{enumerate}
>>> \end{document}
>>>
>
> I missed that---some manual vertical adjustment seems necessary. You can use \raisebox on the minipage:
>
> \documentclass{article}
> \usepackage{amsmath}
> \begin{document}
>
> \begin{enumerate}
>
> \item
> \raisebox{-.8pt}{\begin{minipage}{2in}\begin{align*}
> 2x+3y&=4\\
> 3x-4y&=12
> \end{align*}
> \end{minipage}}
> \end{enumerate}
> \end{document}
>
>
> ----------- 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
>