I'm not sure if this is a proper use of this board, but I just spent a considerable amount of time trying to solve a problem that the Internet was no help for, and I figured that if anyone else ever has this problem, this post might save them some time. (The problem was in align, and the Internet's only suggestion was "use eqnarray instead".) I'm still just a n00b, though, so if this should go elsewhere or nowhere, or if the solution is obvious and I just need more experience, let me know.
Anyway, I was getting the following error when using "align":
Code: Select all
Missing # inserted in alignment preamble.<to be read again>\crcr1.232 \end{align}
\def\span{\mathrm{span}}
Redefining \span (which LaTeX apparently uses for something completely different) screwed up the compiling of the align environment. Switching \span to \spn (or anything else the LaTeX didn't already use) immediately fixed the problem.
The big issue was that there was no indication of \def\span being a problem. On further testing after finding the problem, switching to \DeclareMathOperator{\span}{span} gave an illuminating error.
So, to anyone with this error, start with the simplest possible file:
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{amsmath}\begin{document}\begin{align}0 &= 0 \\1 &= 1\end{align}\end{document}
Now, start adding your "\def"s from the offending document. Keep doing so until the file won't compile anymore. That last one is your culprit.
Hope that helps,
Adam