# Automatic Way of Searching for Syntax Inconsistencies

I have a large .tex file, and when ran am receiving error messages about missing $ or extra delimiter/missing {. It tells me in the log file where the error is "supposed" to be located, but it is not there. I believe it is somewhere else in the file though. My question, is there an automatic way of FINDING exactly where the syntax inconsistencies in your file are when the log file just provide a line number and even then sometimes it gives incorrect line number locations such as: having one brace {... with no closing brace, or having one math delimiter $... or \(..., and missing the other. A small snapshot is below of what was reported back after compilation.

And this is what my line 16 looks like below: Line 16

-
Not directly answering your question, but I would guess you have \( in a caption. Delete the .lof file and add \usepackage{fixltx2e} and \( will become robust. –  David Carlisle Dec 22 '12 at 20:40
If you run pdflatex with the command line option -file-line-error, you'll discover that the error is not at line 16 of the main file, but in the .lof file. –  egreg Dec 22 '12 at 20:52
@DavidCarlisle: +1.. This work flawlessly. Thanks to being first on the scene. :p –  night owl Dec 22 '12 at 20:56
@egreg: Thanks. This is useful. I'm sure running this -file-<...>-<...> has other useful applications to it as well. I will look into this further. –  night owl Dec 22 '12 at 20:58