I am writing a book-length text using LaTeX. I sometimes find difficulty in finding/understanding the various errors when compiling. I am using Emacs/AUCTeX. Is there a way of modifying emacs to make debugging easier?
1 Answer
What you can do is to use the compilation from emacs with M-x compile
. Then you can write the command you want to use, for example pdflatex doc.tex
.
A new buffer will open: *compilation*
in this buffer you can use tab
to go to the next warning/error which indicate the line where the problem occurs.
by hitting enter
, you'll open a buffer where the error occurs at the correct line. So you have two buffer open, one with your (La)TeX file and the other with the log:
-
What's the difference with compiling with AUCTeX, which, in addition, provides more descriptive information for common errors and warnings not available elsewhere?– giordanoFeb 16, 2016 at 7:56
-
@giordano I do not use AUCTeX. This is why I presented this solution. Compiling with AUCTeX and following the path I presented should be a solution too Feb 16, 2016 at 7:59
-
If one really wants to manually type
pdflatex doc.tex
, lose forward/inverse search and the possibility to view a nice formatted list of error and warnings (in addition to the descriptive help messages already mentioned above), and stop at the first error encountered (so one has to compile n times to fix n errors, instead of compiling just once and spot errors all together), then probably yes, this is a solution too.– giordanoFeb 17, 2016 at 8:47
latex
with the option-file-line-error
. If that's not to the point, please clarify what you are asking.