When I attempt to include a table of contents in any file, it will not compile and I get a strange list of errors. For example,
\documentclass[11pt]{amsart}
\begin{document}
\section{Dummy section}
\end{document}
compiles with no trouble, while
\documentclass[11pt]{amsart}
\begin{document}
\tableofcontents
\section{Dummy section}
\end{document}
gives five errors, beginning with
Paragraph ended before \contentsline was complete
You can't use '\lastskip' in vertical mode.
No output is produced. Please help, and thanks.
Best Answer
I can't say exactly what happened, but obviously LaTeX got interrupted by something during one of your compilations. This caused some incomplete data written into
.aux
and/or.toc
and/or.lot
,.lof
, ... file. It is difficult to say what exactly it was, but deleting these files should solve the problem.