3

With this set up (let me know if I've missed something out)

    \documentclass[11pt, a4paper, oneside]{Thesis} 
    \graphicspath{{Pictures/}} 
    \usepackage{amsmath}
    \usepackage[square, numbers, comma, sort&compress]{natbib} 
    \hypersetup{urlcolor=black, colorlinks=true}
    \title{\ttitle}

I get the following error

LaTeX Error: \begin{eqnarray} on input line 186 ended by \end{document}.

This is the equation beginning at line 186

    \begin{eqnarray} 
        &\frac{\partial}{\partial t} G ~=~ 
        \frac{(2\pi\hbar)^6}{\hbar}
        \displaystyle\sum_{c} 
        \int\limits\nolimits_{ } 
        \frac{d\textbf{p}}{(2\pi\hbar)^3}
        \frac{d\textbf{P}}{(2\pi\hbar)^3}
        \frac{d\bar{\textbf{p}}}{(2\pi\hbar)^3}
        \frac{d\bar{\textbf{P}}}{(2\pi\hbar)^3}
        G\left(\frac{m_{bc}}{m_c}\textbf{P}+\textbf{p}\right)\nonumber \\
        & |\langle\textbf{p}|T_{bc}^{R}|
        \bar{\textbf{p}}\rangle|^2
        \delta\left(\textbf{P}-\bar{\textbf{P}}\right)
        \times2\pi\delta\left(E_{bc} - \bar{E}_{bc}\right)\nonumber \\
        & \times\bigg\{\delta\left(\frac{m_{bc}}{m_c}\bar{\textbf{P}}+
        \bar{\textbf{p}} - 
        \textbf{p}_b\right)
        f_c\left(\frac{m_{bc}}{m_b}\bar{\textbf{P}}\bar{\textbf{p}}\right)\nonumber \\
        &-\delta\left( \frac{m_{bc} {m_c}\textbf{P}+\textbf{p}-\textbf{p}_b\right)
        f_c\left(\frac{m_{bc}}{m_b}\textbf{P}+\textbf{p}\right)\bigg\}   
    \end{eqnarray}

Can anyone tell me what's going on? This section of code is in a separate .tex file labelled 'Chapter2', which is then inputted into the main .tex file, if that bears any relation to the problem.

David Carlisle
  • 757,742
Alex
  • 133
  • 1
  • 4

1 Answers1

5

You're missing a } in the second-to-last part of your eqnarray: \frac{m_{bc}}{m_c}, not \frac{m_{bc} {m_c}.

In the spirit of supporting eqnarray vs align, here's a more faithful way to achieve your alignment:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{eqnarray} 
    &\frac{\partial}{\partial t} G ~=~ 
    \frac{(2\pi\hbar)^6}{\hbar}
    \displaystyle\sum_{c} 
    \int
    \frac{d\textbf{p}}{(2\pi\hbar)^3}
    \frac{d\textbf{P}}{(2\pi\hbar)^3}
    \frac{d\bar{\textbf{p}}}{(2\pi\hbar)^3}
    \frac{d\bar{\textbf{P}}}{(2\pi\hbar)^3}
    G\left(\frac{m_{bc}}{m_c}\textbf{P}+\textbf{p}\right)\nonumber \\
    & |\langle\textbf{p}|T_{bc}^{R}|
    \bar{\textbf{p}}\rangle|^2
    \delta\left(\textbf{P}-\bar{\textbf{P}}\right)
    \times2\pi\delta\left(E_{bc} - \bar{E}_{bc}\right)\nonumber \\
    & \times\bigg\{\delta\left(\frac{m_{bc}}{m_c}\bar{\textbf{P}}+
    \bar{\textbf{p}} - 
    \textbf{p}_b\right)
    f_c\left(\frac{m_{bc}}{m_b}\bar{\textbf{P}}\bar{\textbf{p}}\right)\nonumber \\
    &-\delta\left( \frac{m_{bc}}{m_c}\textbf{P}+\textbf{p}-\textbf{p}_b\right)
    f_c\left(\frac{m_{bc}}{m_b}\textbf{P}+\textbf{p}\right)\bigg\}
\end{eqnarray}

\begin{align}
    \frac{\partial}{\partial t} G &= 
        \frac{(2\pi\hbar)^6}{\hbar}
        \sum_{c} 
        \int
        \frac{d\textbf{p}}{(2\pi\hbar)^3}
        \frac{d\textbf{P}}{(2\pi\hbar)^3}
        \frac{d\bar{\textbf{p}}}{(2\pi\hbar)^3}
        \frac{d\bar{\textbf{P}}}{(2\pi\hbar)^3}
        G\Bigl(\frac{m_{bc}}{m_c}\textbf{P}+\textbf{p}\Bigr) \nonumber \\
        &\phantom{{}={}} \times
        \bigl\lvert\langle\textbf{p}\lvert T_{bc}^{R}\rvert
        \bar{\textbf{p}}\rangle\bigr\rvert^2
        \delta\bigl(\textbf{P}-\bar{\textbf{P}}\bigr)
        \times 2\pi\delta\bigl(E_{bc} - \bar{E}_{bc}\bigr) \nonumber \\
        &\phantom{{}={}} \times
        \biggl[\delta\bigl(\frac{m_{bc}}{m_c}\bar{\textbf{P}} +
        \bar{\textbf{p}} - 
        \textbf{p}_b\bigr)
        f_c\Bigl(\frac{m_{bc}}{m_b}\bar{\textbf{P}}\bar{\textbf{p}}\Bigr) \nonumber \\
        &\phantom{{}={}\times\biggl[} {}-
        \delta\Bigl( \frac{m_{bc}}{m_c}\textbf{P}+\textbf{p}-\textbf{p}_b\Bigr)
        f_c\Bigl(\frac{m_{bc}}{m_b}\textbf{P}+\textbf{p}\Bigr)\biggr]
\end{align}
\end{document}
Troy
  • 13,741
Werner
  • 603,163