1

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?

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Francis
  • 295
  • 1
    I can't understand what you're asking. AUCTeX provides both information from the log and, occasionally, a more descriptive help message. Do you want something moreeven informative? – giordano Feb 15 '16 at 22:52
  • Is this a problem with included files? You may want to run latex with the option -file-line-error. If that's not to the point, please clarify what you are asking. – jon Feb 15 '16 at 23:00
  • I think OP wants a "condensed" log message to be displayed, i.e. with only errors & warnings, and the corresponding lines. If this is the case, then this question should probably be marked as a duplicate of this one. – Clément Feb 16 '16 at 02:51

1 Answers1

1

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:

enter image description here

Romain Picot
  • 6,730
  • 4
  • 28
  • 58
  • What's the difference with compiling with AUCTeX, which, in addition, provides more descriptive information for common errors and warnings not available elsewhere? – giordano Feb 16 '16 at 07: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 – Romain Picot Feb 16 '16 at 07: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. – giordano Feb 17 '16 at 08:47