[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Catching the errors

Once you’ve formatted your document you may ‘debug’ it, i.e. browse through the errors (La)TeX reported. You may also have a look at a nicely formatted list of all errors and warnings reported by the compiler.

Command: TeX-next-error arg reparse

(C-c `) Go to the next error reported by TeX. The view will be split in two, with the cursor placed as close as possible to the error in the top view. In the bottom view, the error message will be displayed along with some explanatory text.

An optional numeric arg, positive or negative, specifies how many error messages to move. A negative arg means to move back to previous error messages, see also TeX-previous-error.

The optional reparse argument makes AUCTeX reparse the error message buffer and start the debugging from the first error. This can also be achieved by calling the function with a prefix argument (C-u).

Command: TeX-previous-error arg

(M-g p) Go to the previous error reported by TeX. An optional numeric arg specifies how many error messages to move backward. This is like calling TeX-next-error with a negative argument.

The command TeX-previous-error works only if AUCTeX can parse the whole TeX log buffer. This is controlled by the TeX-parse-all-errors variable.

User Option: TeX-parse-all-errors

If t, AUCTeX automatically parses the whole output log buffer right after running a TeX command, in order to collect all warnings and errors. This makes it possible to navigate back and forth between the error messages using TeX-next-error and TeX-previous-error. This is the default. If nil, AUCTeX does not parse the whole output log buffer and TeX-previous-error cannot be used.

As default, AUCTeX will display a special help buffer containing the error reported by TeX along with the documentation. There is however an ‘expert’ option, which allows you to display the real TeX output.

User Option: TeX-display-help

If t, AUCTeX will automatically display a help text whenever an error is encountered using TeX-next-error (C-c `). If nil, a terse information about the error is displayed in the echo area. If expert AUCTeX will display the output buffer with the raw TeX output.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on January 17, 2024 using texi2html 1.82.