Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

log output

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

Line 16

share|improve this question
5  
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
5  
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

1 Answer 1

I think the answer in full generality is no. There is not. This is due to issues outline in this excellent answer. In short, LaTeX can change what the symbols mean in ways that it is tricky for a "syntax checker" to follow.

I'm sure some editors do a better job than others at doing this, and so I fully expect a better answer to this question to appear.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.