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 use Vim to edit LaTeX documents and pdflatex to compile the documents. One problem with using pdflatex is that it takes time to go through the output to see if there is any warning/errors. Sometimes, I even spend few minutes trying to understand whether a certain line is just an information line or an error/warning. Any idea to make this task easier? Any rules for reading the output of pdflatex? Or may be some tools?

share|improve this question
    
Warnings usually won't interrupt the compile and errors usually will. What parts of the output are you trying to understand? Post an excerpt. –  Matthew Leingang Dec 16 '10 at 10:16
    
Aha, so you mean if the compile is not interrupted than I have no errors? Well, I just want to have a nice list of warnings and errors just like programming IDEs. –  Promather Dec 16 '10 at 10:21
1  
3  
Are you using the Vim-LaTeX plug-in or compiling from outside Vim? Vim-LaTeX will halt on error and give you an IDE-like list of errors. It doesn't halt on warnings, though. stackoverflow.com/questions/3244908/… has some discussion of how to halt on warning, but I've not tired it. –  hoyland Dec 16 '10 at 13:42
add comment

1 Answer

up vote 5 down vote accepted

Try compiling with

pdflatex -file-line-error <filename>

That way, the .log file will generate C-style errors which begin with filename.tex:12:Error message, for an error on line 12; I think vim may even have built-in mechanisms for parsing these, or if not, making a regex for finding them in the log should not be hard.

As others have mentioned there are Vim plugins that have built in methods for dealing with LaTeX errors. Personally, the Vim-LaTeX (AKA the LaTeX suite) plugin annoys me. I think both AucTeX for vim and Vim LaTeX-box, but to each their own. They all have their own methods for dealing with errors.

share|improve this answer
add comment

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.