General troubleshooting
There may be situations where we cannot solve a problem simply by reading and acting on warnings or error messages. Imagine a mysterious error, an untraceable error location, irresolvable references, or just unclear messages from classes or packages.
Locating the cause by the line number which LaTeX printed out or by knowing what we've done since the previous typesetting run, usually helps. Once a problematic line or chunk is located, it could be removed or fixed. Otherwise, it might become difficult.
Here are the general first steps we might go through then:
Compile several times. This may be necessary for correct referencing, positioning of floating figures, and creation of table of contents, bibliography, and lists of tables and figures.
Check the order in which you load the packages. Some packages, like
hyperref
, don't work well if loaded before or after certain packages. You may just swap some lines to correct or to test that.Remove auxiliary files. If anything strange...