On 2022-11-24, Ulrike Fischer <
ne...@nililand.de> wrote:
> Am Thu, 24 Nov 2022 17:50:15 -0000 (UTC) schrieb William Unruh:
>
>> Running in Latex , I have an equations
>>
>> \bea
>> [\Phi(u,v),\Pi(u',v') ]_{(u+v=u'+v')}&=& i \delta((v-u-(v'-u'))/2)
>> \\
>> [\Phi(u,v),\Phi(u',v') ]_{u+v=u'+v'}&=&0
>> \\
>> [\Pi(u,v),\Pi(u',v') ]_{u+v=u'+v'}&=&0
>> \eea
>>
>> (\bea is \begin{eqnarray} and \eea is \end{eqnarray})
>
> Avoid eqnarray
https://tug.org/pracjourn/2006-4/madsen/madsen.pdf
Ah yes. Reminds me of the vi vs emacs wars.
"Full of sound and fury, signifying little"
From what I have read it would seem that array has just as many
infelicities or messiness as does eqnarray.
>
> And avoid such shortened definitions. It makes your source less
> readable for other and disables the environment checking of your
> editor.
It makes typing my manuscript easier, which for me is the a dominant
requirement.
After all I could also carve my equations into granite as well, and they
would last much longer and my freedom for generating just the layout I
want would be much greater :-)
>
>> The first equation lines is OK, but the second gives me the error
>>
>> ! Illegal unit of measure (pt inserted).
>> <to be read again>
>> (
>> l.107 [\Phi(u,v),\Phi(u',v') ]
>> _{u+v=u'+v'}&=&0
>> ?
>>
>> (that is of course the second equation line above)
>>
>> If I replace those [ with \lbrack it works properly. but of course while
>> typing, [ is much easier than \lbrack and reads more easily as well
>> while proofreading the tex.
>>
>>
>> What am I not understanding about [ in this context
>
> \\ takes an optional argument, \\[5pt] or \\ [5pt] inserts a space,
> and with eqnarray it finds the [ on the next line and then complains
> that no dimension follows.
Ah. That I certainly never knew. Another suggestion I found was to use either
{[} or \lbrack. I guess {}[ would also work. All are a pain, but I guess
necessary given the peculiarity of latex.
>
> Use amsmath and align:
>
> \documentclass{article}
> \usepackage{amsmath}
>
> \begin{document}
> \begin{align}
> [\Phi(u,v),\Pi(u',v') ]_{(u+v=u'+v')}&=i \delta((v-u-(v'-u'))/2)
> \\
> [\Phi(u,v),\Phi(u',v') ]_{u+v=u'+v'}&=0
> \\
> [\Pi(u,v),\Pi(u',v') ]_{u+v=u'+v'}&=0
> \end{align}
But if \\ takes an optional argument won't this have the same problem? Or is it
just \\ in the eqnarray environment that has the problems?
Just tried it, and it does not seem to be a problem in the align
environment.
>
> \end{document}
>