Formatting the document with TeX or LaTeX, viewing with a
previewer, printing the document, running BibTeX, making an index, or
checking the document with lacheck
all require running an
external command.
There are two ways to run an external command, you can either run it on
all of the current documents with TeX-command-master
, or on the
current region with TeX-command-region
.
TeX-master
. The available commands are
controlled by the variable TeX-command-list
.
See section Installation of AUC TeX for a discussion about TeX-command-list
and
section Multifile Documents for a discussion about TeX-master
.
TeX-region
. The name of the master file is controlled by the
variable TeX-master
. The header is all text up to the line
matching the regular expression TeX-header-end
. The trailer is
all text from the line matching the regular expression
TeX-trailer-start
. The available commands are controlled by the
variable TeX-command-list
.
AUC TeX will allow one process for each document, plus one process for the region file to be active at the same time. Thus, if you are editing n different documents, you can have n plus one processes running at the same time. If the last process you started was on the region, the commands described in section Catching the errors and section Controlling the output will work on that process, otherwise they will work on the process associated with the current document.
AUC TeX will try to guess what command you want to invoke, but by
default it will assume that you want to run TeX in TeX mode and
LaTeX in LaTeX mode. You can overwrite this by setting the
variable TeX-command-default
.
TeX-command-list
.
If you want to overwrite the values of TeX-header-end
,
TeX-trailer-start
, or TeX-command-default
, you can do that
for all files by setting them in either TeX-mode-hook
,
plain-TeX-mode-hook
, or LaTeX-mode-hook
. To overwrite
them for a single file, define them as file variables (see section `File Variables' in The Emacs Editor). You do this by putting special
formatted text near the end of the file.
% Local Variables: % TeX-header-end: "% End-Of-Header" % TeX-trailer-start: "% Start-Of-Trailer" % TeX-command-default: "SliTeX" % End:
AUC TeX will try to save any buffers related to the document, and
check if the document needs to be reformatted. If the variable
TeX-save-query
is non-nil, AUC TeX will query before saving
each file. By default AUC TeX will check emacs buffers associated
with files in the current directory, in one of the
TeX-macro-private
directories, and in the TeX-macro-global
directories. You can change this by setting the variable
TeX-check-path
.
If nil, just check the current file. Used when checking if any files have changed.