[ < ] [ > ]   [ << ] [ 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.

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.

Normally AUCTeX will only report real errors, but you may as well ask it to report ‘bad boxes’ and warnings as well.

Command: TeX-toggle-debug-bad-boxes

(C-c C-t C-b) Toggle whether AUCTeX should stop at bad boxes (i.e. overfull and underfull boxes) as well as normal errors.

Command: TeX-toggle-debug-warnings

(C-c C-t C-w) Toggle whether AUCTeX should stop at warnings as well as normal errors.

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.

When the option TeX-parse-all-errors is non-nil, you will be also able to open an overview of all errors and warnings reported by the TeX compiler. This feature requires tabulated-list-mode, shipped with GNU Emacs 24 or later.

Command: TeX-error-overview

Show an overview of the errors and warnings occurred in the last TeX run.

In this window you can visit the error on which point is on by pressing <RET>, and visit the next or previous issue by pressing <n> or <p> respectively. A prefix argument to these keys specifies how many errors to move forward or backward. You can visit an error also by clicking on its message. Press <q> to quit the overview.

User Option: TeX-error-overview-open-after-TeX-run

When this boolean variable is non-nil, the error overview will be automatically opened after running TeX if there are errors or warnings to show.

The error overview is opened in a new window of the current frame by default, but you can change this behavior by customizing the option TeX-error-overview-setup.

User Option: TeX-error-overview-setup

Controls the frame setup of the error overview. The possible value is: separate-frame; with a nil value the current frame is used instead.

The parameters of the separate frame can be set with the TeX-error-overview-frame-parameters option.

If the display does not support multi frame, the current frame will be used regardless of the value of this variable.

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

This document was generated by Mosè Giordano on October 29, 2014 using texi2html 1.82.