[texhax] Problem with eqnarray
Modhurita Mitra
mmitra at astro.uiuc.edu
Fri Apr 8 10:48:40 CEST 2005
Hi,
I made the changes you and Morten suggested, so now my expression
looks
like
\begin{eqnarray}
f(x,y,z) & = & P \times \\
\exp \bigl[ -\bigl( \frac{ \cos \theta \cos \phi (x - \mu_x) \\
+ \sin \theta (y - \mu_y) \\
- \cos \theta \sin \phi (z - \mu_z)}{A_x} \bigr)^2 \\
-\bigl(\frac{ \sin \theta \cos \phi (x - \mu_x) \\
+ \cos \theta (y - \mu_y) \\
+ \sin \theta \sin \phi (z - \mu_z)}{A_y} \bigr)^2 \\
-\bigl( \frac{\sin \phi (x - \mu_x) + \cos \phi (z - \mu_z)}{A_z}
\bigr)^2 \bigr]
\end{eqnarray}
However, I still get the errors:
! Missing } inserted.
<inserted text>
}
l.270 ...- \cos \theta \sin \phi (z - \mu_z)}{A_x}
\bigr)^2 \\
?
! Extra }, or forgotten \endgroup.
<inserted text> }
l.270 ...- \cos \theta \sin \phi (z - \mu_z)}{A_x}
\bigr)^2 \\
?
! Missing } inserted.
<inserted text>
}
l.270 ...- \cos \theta \sin \phi (z - \mu_z)}{A_x}
\bigr)^2 \\
?
Could it be that there is some unbalances { somewhere earlier in the text?
Yes, I do tend to press on even when I see an error since then I can see
many errors at once and don't have to compile the file several times.
I am kind of a novice at LaTeX, so I am not sure about the package you
mention. There was \usepackage{natbib} at the beginning of the template
file I am using. And I am using AASTeX, which is called the style file, I
think, for astrophysical journals.
Thanks,
Sincerely,
M.
On Fri, 8 Apr 2005, Robin Fairbairns wrote:
>> I am having trouble compiling my file which contains an eqnarray.
>> At the third line in the following expression (the one beginning with
>> - \cos, I get an error.
>
> in that case, you're not compiling what we see here, or you've some
> highly eccentric package you don't bother to mention:
>
>> \begin{eqnarray}
>> f(x,y,z) & = & P \times \\
>> \exp \left \[ -\left( \frac{ \cos \theta \cos \phi (x - \mu_x) \\
>
> \[ opens displaymath mode, so \left\[ produces the error
>
> ! Missing delimiter (. inserted).
>
> and then (if you're crazy enough to press on)
>
> ! LaTeX Error: Bad math environment delimiter.
>
>> + \sin \theta (y - \mu_y) \\
>> - \cos \theta \sin \phi (z - \mu_z)}{A_x} \right)^2 \\
>
> i suggest you clear up that error (there's a \] later on to clear up,
> too). if that lot then works, perhaps you might consider using one of
> the amsmath align environments in place of the seriously grotty
> eqnarray
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> TeX newsgroup: http://groups.google.com/groups?group=comp.text.tex
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
More information about the texhax
mailing list