[OS X TeX] brackets in \aligned

Martin Costabel costabel at wanadoo.fr
Mon Jul 31 15:23:42 CEST 2006


Bruce Kellogg wrote:
> This seems to be a bug. Using version 2.03 I type:
> 
> \begin{equation*}
> \begin{aligned}
> [v](x) &=1, \\
> \{v\}(x) &=1,\\
> [v](x) &=1. \\
> \end{aligned}
> \end{equation*}
> 
> and get 3 displayed equations. The 2nd and 3rd equations are ok,
> but the first equation is:
> 
>   (x) = 1,

Beginning a line with a bracket can give unexpected results if the 
preceding line ends with a command that takes optional arguments. The 
command \begin{aligned} can take an optional placement parameter like 
[t]. In your case it considers [v] as its optional argument and eats it.

To avoid it, place something invisible like {} between the command 
\begin{aligned} and the bracket, or put a % or a real [t] after the 
\begin{aligned}.

Actually, you are lucky that your third equation doesn't play you a 
similar trick: The command \\ also takes optional paramters in brackets. 
Apparently the amsmath package paid attention to the definition of \\ so 
that this doesn't happen here.

-- 
Martin

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list