[OS X TeX] Using align with "or"
Ross Moore
ross.moore at mq.edu.au
Mon Apr 18 00:47:22 CEST 2011
Hi David,
On 18/04/2011, at 8:35 AM, David Arnold wrote:
> Bruno et al,
>
> This is precisely what I needed. But now I think I also need an explanation. We have:
>
> \begin{alignat}{5}
>
> But the first row has 9 ampersands. I've stumbled into solutions like this on my own, but I just don't understand the use of the ampersands.
Lee Witt said:
>>> If you want to align n columns use 2n-1 &s
The point is that the alignment at each ampersand alternates:
right alignment, then left alignment.
So if you have columns each with an alignment point "inside" the content,
then you need "&&" between the columns,
viz.
A&=B && C&=D && ...
> Is this use of the ampersands explained in any documentation?
Try The LaTeX Companion 1st or 2nd editions.
>
> D.
>
> P.S. Also, is there any way to spread out the output a bit?
try the variants:
\begin{xalignat}{5}
....
or
\begin{xxalignat}{5}
....
and use {alignat*} {xalignat*} if you don't want equation numbers.
{xxalignat} suppresses them anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 32323 bytes
Desc: not available
URL: <http://tug.org/pipermail/macostex-archives/attachments/20110418/2db33ca7/attachment.jpeg>
-------------- next part --------------
>
>
> D.
>
>
> On Apr 17, 2011, at 12:56 PM, Bruno Voisin wrote:
>
>> Le 17 avr. 2011 ? 21:48, Lee D. Witt a ?crit :
>>> Have you tried "alignat"? You specify the number of "columns" to align. If you want to align n columns use 2n-1 &s
>>>
>> \begin{alignat}{5}
>> u &=0 & \quad\text{or}\quad && u+4 &=0 & \quad\text{or}\quad && u-4 &=0 \\
>> u &=0 &&& u &=-4 &&& u &=4 \\
>> \log x &=0 &&& \log x &=-4 &&& \log x &=4
>> \end{alignat}
>>
>> Bruno
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore ross.moore at mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
More information about the macostex-archives
mailing list