Auctex
Auctex
E
X
A sophisticated T
E
X environment for Emacs
Version 11.87, 2012-11-30
Kresten Krab Thorup
Per Abrahamsen
David Kastrup and others
This manual is for AUCT
E
X (version 11.87 from 2012-11-30), a sophisticated TeX environ-
ment for Emacs.
Copyright c 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.3 or any later
version published by the Free Software Foundation; with no Invariant Sections,
no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included
in the section entitled GNU Free Documentation License.
i
Table of Contents
Executive Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Overview of AUCTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Installing AUCTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 Congure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.3 Build/install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.4 Loading the package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.5 Providing AUCTeX as a package . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.6 Installation for non-privileged users . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.7 Installation under MS Windows . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.8 Customizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.1 Functions for editing TeX les . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.1.1 Making your TeX code more readable. . . . . . . . . . . . . . . . 16
1.3.1.2 Entering sectioning commands . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.1.3 Inserting environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.1.4 Inserting macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.1.5 Changing the font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.1.6 Other useful features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.3.2 Creating and viewing output, debugging . . . . . . . . . . . . . . . . . . 18
1.3.2.1 One Command for LaTeX, helpers, viewers, and printing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.3.2.2 Choosing an output format . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3.2.3 Debugging LaTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3.2.4 Running LaTeX on parts of your document . . . . . . . . . . 19
2 Editing the Document Source . . . . . . . . . . . . . . . . 20
2.1 Insertion of Quotes, Dollars, and Braces . . . . . . . . . . . . . . . . . . . . . . . 20
2.2 Inserting Font Speciers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 Inserting chapters, sections, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4 Inserting Environment Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4.1 Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.2 Floats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.3 Itemize-like Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4.4 Tabular-like Environments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4.5 Customizing Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5 Entering Mathematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.6 Completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
ii
2.7 Marking Environments, Sections, or Texinfo Nodes . . . . . . . . . . . . 29
2.7.1 LaTeX Commands for Marking Environments and Sections
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.7.2 Texinfo Commands for Marking Environments and Sections
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.8 Commenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.9 Indenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.10 Filling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3 Controlling Screen Display . . . . . . . . . . . . . . . . . . . 35
3.1 Font Locking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.1.1 Fontication of macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.1.2 Fontication of quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.1.3 Fontication of mathematical constructs . . . . . . . . . . . . . . . . . . 39
3.1.4 Verbatim macros and environments . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.5 Faces used by font-latex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.6 Known fontication problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2 Folding Macros and Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.3 Outlining the Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4 Starting Processors, Viewers and Other
Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1 Executing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1.1 Starting a Command on a Document or Region. . . . . . . . . . . 45
4.1.2 Selecting and Executing a Command . . . . . . . . . . . . . . . . . . . . . 46
4.1.3 Options for TeX Processors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.2 Viewing the Formatted Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2.1 Starting Viewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2.2 Forward and Inverse Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.3 Catching the errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.4 Checking for problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.5 Controlling the output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.6 Cleaning intermediate and output les. . . . . . . . . . . . . . . . . . . . . . . . . 53
4.7 Documentation about macros and packages . . . . . . . . . . . . . . . . . . . . 53
5 Customization and Extension . . . . . . . . . . . . . . . . 54
5.1 Modes and Hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.2 Multile Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.3 Automatic Parsing of TeX Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.4 Language Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.4.1 Using AUCTeX with European Languages . . . . . . . . . . . . . . . . 58
5.4.1.1 Typing and Displaying Non-ASCII Characters . . . . . . . 58
5.4.1.2 Style Files for Dierent Languages . . . . . . . . . . . . . . . . . . . 58
5.4.2 Using AUCTeX with Japanese TeX. . . . . . . . . . . . . . . . . . . . . . . 60
5.5 Automatic Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.5.1 Automatic Customization for the Site . . . . . . . . . . . . . . . . . . . . 62
5.5.2 Automatic Customization for a User . . . . . . . . . . . . . . . . . . . . . . 62
iii
5.5.3 Automatic Customization for a Directory . . . . . . . . . . . . . . . . . 63
5.6 Writing Your Own Style Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.6.1 A Simple Style File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.6.2 Adding Support for Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.6.3 Adding Support for Environments . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.4 Adding Other Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.6.5 Automatic Extraction of New Things . . . . . . . . . . . . . . . . . . . . . 69
Appendix A Copying, Changes, Development,
FAQ, Texinfo Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 72
A.1 Copying this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
A.1.1 GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . 72
A.2 Changes and New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
A.3 Future Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.3.1 Mid-term Goals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.3.2 Wishlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.3.3 Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.4 Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.5 Features specic to AUCTeXs Texinfo major mode . . . . . . . . . . . 93
A.5.1 How AUCTeX and the native mode work together. . . . . . . . 93
A.5.2 Where the native mode is superseded . . . . . . . . . . . . . . . . . . . . 94
A.5.3 Where key bindings are mapped to the native mode . . . . . . 95
A.5.4 Which native mode key bindings are missing . . . . . . . . . . . . . 96
Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Key Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Function Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Variable Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Executive Summary 1
Executive Summary
AUCT
E
X is an integrated environment for editing L
a
T
E
X, ConT
E
Xt, docT
E
X, Texinfo, and
T
E
X les.
Although AUCT
E
X contains a large number of features, there are no reasons to despair.
You can continue to write T
E
X and L
a
T
E
X documents the way you are used to, and only
start using the multiple features in small steps. AUCT
E
X is not monolithic, each feature
described in this manual is useful by itself, but together they provide an environment where
you will make very few L
a
T
E
X errors, and makes it easy to nd the errors that may slip
through anyway.
It is a good idea to make a printout of AUCT
E
Xs reference card tex-ref.tex or one
of its typeset versions.
If you want to make AUCT
E
X aware of style les and multi-le documents right away,
insert the following in your .emacs le.
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
Another thing you should enable is RefT
E
X, a comprehensive solution for managing
cross references, bibliographies, indices, document navigation and a few other things. (see
Section Installation in The RefT
E
X manual)
For detailed information about the preview-latex subsystem of AUCT
E
X, see Section
Introduction in The preview-latex Manual.
There is a mailing list for general discussion about AUCT
E
X: write a mail with sub-
scribe in the subject to [email protected] to join it. Send contributions to
[email protected].
Bug reports should go to [email protected], suggestions for new features, and
pleas for help should go to either [email protected] (the AUCT
E
X developers),
or to [email protected] if they might have general interest. Please use the command
M-x TeX-submit-bug-report RET to report bugs if possible. You can subscribe to
a low-volume announcement list by sending subscribe in the subject of a mail to
[email protected].
Copying 2
Copying
AUCT
E
X primarily consists of Lisp les for Emacs (and XEmacs), but there are also instal-
lation scripts and les and T
E
X support les. All of those are free; this means that everyone
is free to use them and free to redistribute them on a free basis. The les of AUCT
E
X are not
in the public domain; they are copyrighted and there are restrictions on their distribution,
but these restrictions are designed to permit everything that a good cooperating citizen
would want to do. What is not allowed is to try to prevent others from further sharing any
version of these programs that they might get from you.
Specically, we want to make sure that you have the right to give away copies of the
les that constitute AUCT
E
X, that you receive source code or else can get it if you want it,
that you can change these les or use pieces of them in new free programs, and that you
know you can do these things.
To make sure that everyone has such rights, we have to forbid you to deprive anyone
else of these rights. For example, if you distribute copies of parts of AUCT
E
X, you must
give the recipients all the rights that you have. You must make sure that they, too, receive
or can get the source code. And you must tell them their rights.
Also, for our own protection, we must make certain that everyone nds out that there
is no warranty for AUCT
E
X. If any parts are modied by someone else and passed on, we
want their recipients to know that what they have is not what we distributed, so that any
problems introduced by others will not reect on our reputation.
The precise conditions of the licenses for the les currently being distributed as part of
AUCT
E
X are found in the General Public Licenses that accompany them. This manual
specically is covered by the GNU Free Documentation License (see Section A.1 [Copying
this Manual], page 72).
Chapter 1: Introduction 3
1 Introduction
1.1 Overview of AUCT
E
X
AUCT
E
X is a comprehensive customizable integrated environment for writing input les for
T
E
X, L
a
T
E
X, ConT
E
Xt, Texinfo, and docT
E
X using Emacs or XEmacs.
It supports you in the insertion of macros, environments, and sectioning commands by
providing completion alternatives and prompting for parameters. It automatically indents
your text as you type it and lets you format a whole le at once. The outlining and folding
facilities provide you with a focused and clean view of your text.
AUCT
E
X lets you process your source les by running T
E
X and related tools (such as
output lters, post processors for generating indices and bibliographies, and viewers) from
inside Emacs. AUCT
E
X lets you browse through the errors T
E
X reported, while it moves the
cursor directly to the reported error, and displays some documentation for that particular
error. This will even work when the document is spread over several les.
One component of AUCT
E
X that L
a
T
E
X users will nd attractive is preview-latex, a
combination of folding and in-source previewing that provides true What You See Is What
You Get experience in your sourcebuer, while letting you retain full control.
More detailed information about the features and usage of AUCT
E
X can be found in the
remainder of this manual.
AUCT
E
X is written entirely in Emacs Lisp, and hence you can easily add new features
for your own needs. It is a GNU project and distributed under the GNU General Public
License Version 3.
The most recent version is always available at http://ftp.gnu.org/pub/gnu/auctex/.
WWW users may want to check out the AUCT
E
X page at
http://www.gnu.org/software/auctex/.
For comprehensive information about how to install AUCT
E
X See Section 1.2 [Installa-
tion], page 3, or Section 1.2.7 [Installation under MS Windows], page 10, respectively.
If you are considering upgrading AUCT
E
X, the recent changes are described in
Section A.2 [Changes], page 79.
If you want to discuss AUCT
E
X with other users or its developers, there are several
mailing lists you can use.
Send a mail with the subject subscribe to [email protected] in order to join
the general discussion list for AUCT
E
X. Articles should be sent to [email protected]. In a
similar way, you can subscribe to the [email protected] list for just getting important
announcements about AUCT
E
X. The list [email protected] is for bug reports which
you should usually le with the M-x TeX-submit-bug-report RET command. If you want
to address the developers of AUCT
E
X themselves with technical issues, they can be found
on the discussion list [email protected].
1.2 Installing AUCT
E
X
The simplest way of installing AUCT
E
X is by using the Emacs package manager integrated
in Emacs 24 and greater (ELPA). Simply do M-x package-list-packages RET, mark the
Chapter 1: Introduction 4
auctex package for installation with i, and hit x to execute the installation procedure.
Thats all.
The remainder of this section is about installing AUCT
E
X from a release tarball or from
a checkout of the AUCT
E
X repository.
Installing AUCT
E
X should be simple: merely ./configure, make, and make install
for a standard site-wide installation (most other installations can be done by specifying a
--prefix=... option).
On many systems, this will already activate the package, making its modes the de-
fault instead of the built-in modes of Emacs. If this is not the case, consult Section 1.2.4
[Loading the package], page 7. Please read through this document fully before installing
anything. The installation procedure has changed as compared to earlier versions. Users
of MS Windows are asked to consult See Section 1.2.7 [Installation under MS Windows],
page 10.
1.2.1 Prerequisites
A recent version of Emacs, alternatively XEmacs
Emacs 20 is no longer supported, and neither is XEmacs with a version of xemacs-
base older than 1.84 (released in sumo from 02/02/2004). Using preview-latex requires
a version of Emacs compiled with image support. While the X11 version of Emacs 21
will likely work, Emacs 22 and later is preferred.
Windows Precompiled versions are available from
ftp://ftp.gnu.org/gnu/emacs/windows/.
Mac OS X For an overview of precompiled versions of Emacs for Mac OS X see for
example http://www.emacswiki.org/cgi-bin/wiki/EmacsForMacOS.
GNU/Linux
Most GNU/Linux distributions nowadays provide a recent variant of Emacs
via their package repositories.
Self-compiled
Compiling Emacs yourself requires a C compiler and a number of tools
and development libraries. Details are beyond the scope of this man-
ual. Instructions for checking out the source code can be found at
https://savannah.gnu.org/bzr/?group=emacs.
If you really need to use Emacs 21 on platforms where this implies missing image
support, you should disable the installation of preview-latex (see below).
While XEmacs (version 21.4.15, 21.4.17 or later) is supported, doing this in a satisfac-
tory manner has proven to be dicult. This is mostly due to technical shortcomings
and diering APIs which are hard to come by. If AUCT
E
X is your main application
for XEmacs, you are likely to get better results and support by switching to Emacs.
Of course, you can improve support for your favorite editor by giving feedback in case
you encounter bugs.
A working T
E
X installation
Well, AUCT
E
X would be pointless without that. Processing documentation requires
T
E
X, L
a
T
E
X and Texinfo during installation. preview-latex requires Dvips for its op-
Chapter 1: Introduction 5
eration in DVI mode. The default conguration of AUCT
E
X is tailored for teT
E
X or
T
E
Xlive-based distributions, but can be adapted easily.
A recent Ghostscript
This is needed for operation of preview-latex in both DVI and PDF mode. Most ver-
sions of Ghostscript nowadays in use should work ne (version 7.0 and newer). If you
encounter problems, check Section Problems with Ghostscript in the preview-latex
manual.
The texinfo package
Strictly speaking, you can get away without it if you are building from the distribution
tarball, have not modied any les and dont need a printed version of the manual: the
pregenerated info le is included in the tarball. At least version 4.0 is required.
For some known issues with various software, see Section Known problems in the
preview-latex manual.
1.2.2 Congure
The rst step is to congure the source code, telling it where various les will be. To do so,
run
./configure options
(Note: if you have fetched AUCT
E
X from CVS rather than a regular release, you will
have to rst follow the instructions in README.CVS).
On many machines, you will not need to specify any options, but if configure cannot
determine something on its own, youll need to help it out with one of these options:
--prefix=/usr/local
All automatic placements for package components will be chosen from sensible
existing hierarchies below this: directories like man, share and bin are
supposed to be directly below prex.
Only if no workable placement can be found there, in some cases an alternative
search will be made in a prex deduced from a suitable binary.
/usr/local is the default prex, intended to be suitable for a site-wide in-
stallation. If you are packaging this as an operating system component for
distribution, the setting /usr will probably be the right choice. If you are
planning to install the package as a single non-priviledged user, you will typi-
cally set prex to your home directory.
--with-emacs[=/path/to/emacs]
If you are using a pretest which isnt in your $PATH, or configure is not nding
the right Emacs executable, you can specify it with this option.
--with-xemacs[=/path/to/xemacs]
Congure for generation under XEmacs (Emacs is the default). Again, the
name of the right XEmacs executable can be specied, complete with path if
necessary.
--with-packagedir=/dir
This XEmacs-only option congures the directory for XEmacs packages. A
typical user-local setting would be ~/.xemacs/xemacs-packages. If this di-
Chapter 1: Introduction 6
rectory exists and is below prex, it should be detected automatically. This
will install and activate the package.
--without-packagedir
This XEmacs-only option switches the detection of a package directory and
corresponding installation o. Consequently, the Emacs installation scheme
will be used. This might be appropriate if you are using a dierent package
system/installer than the XEmacs one and want to avoid conicts.
The Emacs installation scheme has the following options:
--with-lispdir=/dir
This Emacs-only option species the location of the site-lisp directory
within load-path under which the les will get installed (the bulk will get
installed in a subdirectory). ./configure should gure this out by itself.
--with-auctexstartfile=auctex.el
--with-previewstartfile=preview-latex.el
This is the name of the respective startup les. If lispdir contains a subdirectory
site-start.d, the start les are placed there, and site-start.el should
load them automatically. Please be aware that you must not move the start
les after installation since other les are found relative to them.
--with-packagelispdir=auctex
This is the directory where the bulk of the package gets located. The startle
adds this into load-path.
--with-auto-dir=/dir
You can use this option to specify the directory containing automatically gen-
erated information. It is not necessary for most T
E
X installs, but may be used
if you dont like the directory that congure is suggesting.
--help This is not an option specic to AUCT
E
X. A number of standard options to
configure exist, and we do not have the room to describe them here; a short
description of each is available, using --help. If you use --help=recursive,
then also preview-latex-specic options will get listed.
--disable-preview
This disables conguration and installation of preview-latex. This option is not
actually recommended. If your Emacs does not support images, you should
really upgrade to a newer version. Distributors should, if possible, refrain from
distributing AUCT
E
X and preview-latex separately in order to avoid confusion
and upgrade hassles if users install partial packages on their own.
--with-texmf-dir=/dir
--without-texmf-dir
This option is used for specifying a TDS-compliant directory hierarchy. Using --
with-texmf-dir=/dir you can specify where the T
E
X TDS directory hierarchy
resides, and the T
E
X les will get installed in /dir/tex/latex/preview/.
If you use the --without-texmf-dir option, the T
E
X-related les will be kept
in the Emacs Lisp tree, and at runtime the TEXINPUTS environment variable
will be made to point there. You can install those les into your own T
E
X tree
at some later time with M-x preview-install-styles RET.
Chapter 1: Introduction 7
--with-tex-dir=/dir
If you want to specify an exact directory for the preview T
E
X les, use --with-
tex-dir=/dir. In this case, the les will be placed in /dir, and youll also
need the following option:
--with-doc-dir=/dir
This option may be used to specify where the T
E
X documentation goes. It
is to be used when you are using --with-tex-dir=/dir, but is normally not
necessary otherwise.
1.2.3 Build/install
Once configure has been run, simply enter
make
at the prompt to byte-compile the lisp les, extract the T
E
X les and build the documen-
tation les. To install the les into the locations chosen earlier, type
make install
You may need special privileges to install, e.g., if you are installing into system directo-
ries.
1.2.4 Loading the package
You can detect the successful activation of AUCT
E
X and preview-latex in the menus after
loading a L
a
T
E
X le like preview/circ.tex: AUCT
E
X then gives you a Command menu,
and preview-latex gives you a Preview menu.
For XEmacs, if the installation occured into a valid package directory (which is the
default), then this should work out of the box.
With Emacs (or if you explicitly disabled use of the package system), the startup les
auctex.el and preview-latex.el may already be in a directory of the site-start.d/
variety if your Emacs installation provides it. In that case they should be automatically
loaded on startup and nothing else needs to be done. If not, they should at least have been
placed somewhere in your load-path. You can then load them by placing the lines
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
into your init le.
If you explicitly used --with-lispdir, you may need to add the specied directory into
Emacs load-path variable by adding something like
(add-to-list load-path "~/elisp")
before the above lines into your Emacs startup le.
For site-wide activation in GNU Emacs, see See Section 1.2.5 [Advice for package
providers], page 8.
Once activated, the modes provided by AUCT
E
X are used per default for all supported
le types. If you want to change the modes for which it is operative instead of the default,
use
M-x customize-variable RET TeX-modes RET
If you want to remove a preinstalled AUCT
E
X completely before any of its modes have
been used,
Chapter 1: Introduction 8
(unload-feature tex-site)
should accomplish that.
1.2.5 Providing AUCT
E
X as a package
As a package provider, you should make sure that your users will be served best according
to their intentions, and keep in mind that a system might be used by more than one user,
with dierent preferences.
There are people that prefer the built-in Emacs modes for editing T
E
X les, in particular
plain T
E
X users. There are various ways to tell AUCT
E
X even after auto-activation that
it should not get used, and they are described in Chapter 1 [Introduction to AUCT
E
X],
page 3.
So if you have users that dont want to use the preinstalled AUCT
E
X, they can easily
get rid of it. Activating AUCT
E
X by default is therefore a good choice.
If the installation procedure did not achieve this already by placing auctex.el and
preview-latex.el into a possibly existing site-start.d directory, you can do this by
placing
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
in the system-wide site-start.el.
If your package is intended as an XEmacs package or to accompany a precompiled version
of Emacs, you might not know which T
E
X system will be available when preview-latex gets
used. In this case you should build using the --without-texmf-dir option described
previously. This can also be convenient for systems that are intended to support more than
a single TeX distribution. Since more often than not T
E
X packages for operating system
distributions are either much more outdated or much less complete than separately provided
systems like T
E
X Live, this method may be generally preferable when providing packages.
The following package structure would be adequate for a typical fully supported Unix-like
installation:
preview-tetex
Style les and documentation for preview.sty, placed into a T
E
X tree where
it is accessible from the teT
E
X executables usually delivered with a system. If
there are other commonly used T
E
X system packages, it might be appropriate
to provide separate packages for those.
auctex-emacs-tetex
This package will require the installation of preview-tetex and will record in
TeX-macro-global where to nd the T
E
X tree. It is also a good idea to run
emacs -batch -f TeX-auto-generate-global
when either AUCT
E
X or teT
E
X get installed or upgraded. If your users might
want to work with a dierent T
E
X distribution (nowadays pretty common),
instead consider the following:
auctex-emacs
This package will be compiled with --without-texmf-dir and will conse-
quently contain the preview style les in its private directory. It will prob-
ably not be possible to initialize TeX-macro-global to a sensible value, so
Chapter 1: Introduction 9
running TeX-auto-generate-global does not appear useful. This package
would neither conict with nor provide preview-tetex.
auctex-xemacs-tetex
auctex-xemacs
Those are the obvious XEmacs equivalents. For XEmacs, there is the additional
problem that the XEmacs sumo package tree already possibly provides its own
version of AUCT
E
X, and the user might even have used the XEmacs package
manager to updating this package, or even installing a private AUCT
E
X version.
So you should make sure that such a package will not conict with existing
XEmacs packages and will be at an appropriate place in the load order (after
site-wide and user-specic locations, but before a distribution-specic sumo
package tree). Using the --without-packagedir option might be one idea to
avoid conicts. Another might be to refrain from providing an XEmacs package
and just rely on the user or system administrator to instead use the XEmacs
package system.
1.2.6 Installation for non-privileged users
Often people without system administration privileges want to install software for their
private use. In that case you need to pass more options to the configure script. For
XEmacs users, this is fairly easy, because the XEmacs package system has been designed
to make this sort of thing practical: but GNU Emacs users (and XEmacs users for whom
the package system is for some reason misbehaving) may need to do a little more work.
The main expedient is using the --prefix option to the configure script, and let
it point to the personal home directory. In that way, resulting binaries will be installed
under the bin subdirectory of your home directory, manual pages under man and so on.
It is reasonably easy to maintain a bunch of personal software, since the prex argument is
supported by most configure scripts.
Youll have to add something like /home/myself/share/emacs/site-lisp to your
load-path variable, if it isnt there already.
XEmacs users can achieve the same end by pointing configure at an appropriate package
directory (normally --with-packagedir=~/.xemacs/xemacs-packages will serve). The
package directory stands a good chance at being detected automatically as long as it is in
a subtree of the specied prex.
Now here is another thing to ponder: perhaps you want to make it easy for other
users to share parts of your personal Emacs conguration. In general, you can do this
by writing ~myself/ anywhere where you specify paths to something installed in your
personal subdirectories, not merely ~/, since the latter, when used by other users, will
point to non-existent les.
For yourself, it will do to manipulate environment variables in your .profile resp.
.login les. But if people will be copying just Elisp les, their copies will not work.
While it would in general be preferable if the added components where available from a
shell level, too (like when you call the standalone info reader, or try using preview.sty
for functionality besides of Emacs previews), it will be a big help already if things work
from inside of Emacs.
Here is how to do the various parts:
Chapter 1: Introduction 10
Making the Elisp available
In GNU Emacs, it should be sucient if people just do
(load "~myself/share/emacs/site-lisp/auctex.el" nil t t)
(load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t)
where the path points to your personal installation. The rest of the package should be
found relative from there without further ado.
In XEmacs, you should ask the other users to add symbolic links in the subdirectories
lisp, info and etc of their ~/.xemacs/xemacs-packages/ directory. (Alas, there is
presently no easy programmatic way to do this, except to have a script do the symlinking
for them.)
Making the Info les available
For making the info les accessible from within Elisp, something like the following might
be convenient to add into your or other peoples startup les:
(eval-after-load info
(add-to-list Info-directory-list "~myself/info"))
In XEmacs, as long as XEmacs can see the package, there should be no need to do
anything at all; the info les should be immediately visible. However, you might want to
set INFOPATH anyway, for the sake of standalone readers outside of XEmacs. (The info les
in XEmacs are normally in ~/.xemacs/xemacs-packages/info.)
Making the L
a
T
E
X style available
If you want others to be able to share your installation, you should congure it using
--without-texmf-dir, in which case things should work as well for them as for you.
1.2.7 Installation under MS Windows
In a Nutshell
The following are brief installation instructions for the impatient. In case you dont under-
stand some of this, run into trouble of some sort, or need more elaborate information, refer
to the detailed instructions further below.
1. Install the prerequisites, i.e. Emacs or XEmacs, MSYS or Cygwin, a T
E
X system, and
Ghostscript.
2. Open the MSYS shell or a Cygwin shell and change to the directory containing the
unzipped le contents.
3. Congure AUCT
E
X:
For Emacs: Many people like to install AUCT
E
X into the pseudo le system hierar-
chy set up by the Emacs installation. Assuming Emacs is installed in C:/Program
Files/Emacs and the directory for local additions of your T
E
X system, e.g. MiKT
E
X,
is C:/localtexmf, you can do this by typing the following statement at the shell
prompt:
./configure --prefix=C:/Program Files/Emacs \
--infodir=C:/Program Files/Emacs/info \
--with-texmf-dir=C:/localtexmf
Chapter 1: Introduction 11
For XEmacs: You can install AUCT
E
X as an XEmacs package. Assuming XEmacs is
installed in C:/Program Files/XEmacs and the directory for local additions of your
T
E
X system, e.g. MiKT
E
X, is C:/localtexmf, you can do this by typing the following
command at the shell prompt:
./configure --with-xemacs=C:/Program Files/XEmacs/bin/xemacs \
--with-texmf-dir=C:/localtexmf
The commands above are examples for common usage. More on conguration options
can be found in the detailed installation instructions below.
If the conguration script failed to nd all required programs, make sure that these
programs are in your system path and add directories containing the programs to the
PATH environment variable if necessary. Here is how to do that in W2000/XP:
1. On the desktop, right click My Computer and select properties.
2. Click on Advanced in the System Properties window.
3. Select Environment Variables.
4. Select path in System Variables and click edit. Move to the front in the
line (this might require scrolling) and add the missing path including drive letter,
ended with a semicolon.
4. If there were no further error messages, type
make
In case there were, please refer to the detailed description below.
5. Finish the installation by typing
make install
Detailed Installation Instructions
Installation of AUCT
E
X under Windows is in itself not more complicated than on other
platforms. However, meeting the prerequisites might require more work than on some other
platforms, and feel less natural.
If you are experiencing any problems, even if you think they are of your own making,
be sure to report them to [email protected] so that we can explain things better in
future.
Windows is a problematic platform for installation scripts. The main problem is that the
installation procedure requires consistent le names in order to nd its way in the directory
hierarchy, and Windows path names are a mess.
The installation procedure tries nding stu in system search paths and in Emacs paths.
For that to succeed, you have to use the same syntax and spelling and case of paths ev-
erywhere: in your system search paths, in Emacs load-path variable, as argument to the
scripts. If your path names contain spaces or other shell-unfriendly characters, most no-
tably backslashes for directory separators, place the whole path in "double quote marks"
whenever you specify it on a command line.
Avoid helpful magic le names like /cygdrive/c and C:\PROGRA~1\ like the plague.
It is quite unlikely that the scripts will be able to identify the actual le names in-
volved. Use the full paths, making use of normal Windows drive letters like C:/Program
Files/Emacs where required, and using the same combination of upper- and lowercase
Chapter 1: Introduction 12
letters as in the actual les. File names containing shell-special characters like spaces or
backslashes (if you prefer that syntax) need to get properly quoted to the shell: the above
example used single quotes for that.
Ok, now here are the steps to perform:
1. You need to unpack the AUCT
E
X distribution (which you seemingly have done since
you are reading this). It must be unpacked in a separate installation directory outside
of your Emacs le hierarchy: the installation will later copy all necessary les to their
nal destination, and you can ultimately remove the directory where you unpacked the
les.
Line endings are a problem under Windows. The distribution contains only text les,
and theoretically most of the involved tools should get along with that. However, the
les are processed by various utilities, and it is conceivable that not all of them will
use the same line ending conventions. If you encounter problems, it might help if you
try unpacking (or checking out) the les in binary mode, if your tools allow that.
If you dont have a suitable unpacking tool, skip to the next step: this should provide
you with a working unzip command.
2. The instal-
lation of AUCT
E
X will require the MSYS tool set from http://www.mingw.org/ or
the Cygwin tool set from http://cygwin.com/. The latter is slower and larger (the
download size of the base system is about 15 MB) but comes with a package man-
ager that allows for updating the tool set and installing additional packages like, for
example, the spell checker aspell.
If Cygwin specic paths like /cygdrive/c crop up in the course of the installation,
using a non-Cygwin Emacs could conceivably cause trouble. Using Cygwin either for
everything or nothing might save headaches, if things dont work out.
3. Install a current version of XEmacs from http://www.xemacs.org/ or Emacs from
ftp://ftp.gnu.org/gnu/emacs/windows/. Emacs is the recommended choice because
it is currently the primary platform for AUCT
E
X development.
4. You need a working T
E
X installation. One popular installation under Windows is
MiKT
E
X. Another much more extensive system is T
E
X Live which is rather close to
its Unix cousins.
5. A working copy of Ghostscript is required for preview-latex operation. Examining the
output from
gswin32c -h
on a Windows command line should tell you whether your Ghostscript supports the
png16m device needed for PNG support. MiKTeX apparently comes with its own Ghost-
script called mgs.exe.
6. Perl is needed for rebuilding the documentation if you are working with a copy from
CVS or have touched documentation source les in the preview-latex part. If the line
endings of the le preview/latex/preview.dtx dont correspond with what Perl
calls \n when reading text les, youll run into trouble.
7. Now the fun stu starts. If you have not yet done so, unpack the AUCT
E
X distribution
into a separate directory after rereading the instructions for unpacking above.
Chapter 1: Introduction 13
8. Ready for takeo. Start some shell (typically bash) capable of running configure,
change into the installation directory and call ./configure with appropriate options.
Typical options youll want to specify will be
--prefix=drive:/path/to/emacs-hierarchy
which tells configure where to perform the installation. It may also make
configure nd Emacs or XEmacs automatically; if this doesnt happen,
try one of --with-emacs or --with-xemacs as described below. All
automatic detection of les and directories restricts itself to directories
below the prex or in the same hierarchy as the program accessing the
les. Usually, directories like man, share and bin will be situated right
under prex.
This option also aects the defaults for placing the Texinfo documentation
les (see also --infodir below) and automatically generated style hooks.
If you have a central directory hierarchy (not untypical with Cygwin) for
such stu, you might want to specify its root here. You stand a good
chance that this will be the only option you need to supply, as long as your
T
E
X-related executables are in your system path, which they better be for
AUCT
E
Xs operation, anyway.
--with-emacs
if you are installing for a version of Emacs. You can use
--with-emacs=drive:/path/to/emacs to specify the name of the in-
stalled Emacs executable, complete with its path if necessary (if Emacs is
not within a directory specied in your PATH environment setting).
--with-xemacs
if you are installing for a version of XEmacs. Again, you can use
--with-xemacs=drive:/path/to/xemacs to specify the name of the in-
stalled XEmacs executable complete with its path if necessary. It may also
be necessary to specify this option if a copy of Emacs is found in your PATH
environment setting, but you still would like to install a copy of AUCT
E
X
for XEmacs.
--with-packagedir=drive:/dir
is an XEmacs-only option giving the location of the package directory. This
will install and activate the package. Emacs uses a dierent installation
scheme:
--with-lispdir=drive:/path/to/site-lisp
This Emacs-only option tells a place in load-path below which the les
are situated. The startup les auctex.el and preview-latex.el will
get installed here unless a subdirectory site-start.d exists which will
then be used instead. The other les from AUCT
E
X will be installed in a
subdirectory called auctex.
If you think that you need a dierent setup, please refer to the full instal-
lation instructions in Section 1.2.2 [Congure], page 5.
Chapter 1: Introduction 14
--infodir=drive:/path/to/info/directory
If you are installing into an Emacs directory, info les have to be put into
the info folder below that directory. The conguration script will usually
try to install into the folder share/info, so you have to override this by
specifying something like --infodir=C:/Program Files/info for the
congure call.
--with-auto-dir=drive:/dir
Directory containing automatically generated information. You should not
normally need to set this, as --prefix should take care of this.
--disable-preview
Use this option if your Emacs version is unable to support image display.
This will be the case if you are using a native variant of Emacs 21.
--with-texmf-dir=drive:/dir
This will specify the directory where your T
E
X installation sits. If your
T
E
X installation does not conform to the TDS (T
E
X directory standard),
you may need to specify more options to get everything in place.
For more information about any of the above and additional options, see Section 1.2.2
[Congure], page 5.
Calling ./configure --help=recursive will tell about other options, but those are
almost never required.
Some executables might not be found in your path. That is not a good idea, but you
can get around by specifying environment variables to configure:
GS="drive:/path/to/gswin32c.exe" ./configure ...
should work for this purpose. gswin32c.exe is the usual name for the required
command line executable under Windows; in contrast, gswin32.exe is likely to fail.
As an alternative to specifying variables for the configure call you can add directories
containing the required executables to the PATH variable of your Windows system. This
is especially a good idea if Emacs has trouble nding the respective programs later
during normal operation.
9. Run make in the installation directory.
10. Run make install in the installation directory.
11. With XEmacs, AUCT
E
X and preview-latex should now be active by default. With
Emacs, activation depends on a working site-start.d directory or similar setup,
since then the startup les auctex.el and preview-latex.el will have been placed
there. If this has not been done, you should be able to load the startup les manually
with
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
in either a site-wide site-start.el or your personal startup le (usually accessible
as ~/.emacs from within Emacs and ~/.xemacs/init.el from within XEmacs).
The default conguration of AUCT
E
X is probably not the best t for Windows systems
with MiKT
E
X. You might want to add
Chapter 1: Introduction 15
(require tex-mik)
after loading auctex.el and preview-latex.el in order to get more appropriate
values for some customization options.
You can always use
M-x customize-group RET AUCTeX RET
in order to customize more stu, or use the Customize menu.
12. Load preview/circ.tex into Emacs or XEmacs and see if you get the Command
menu. Try using it to L
a
T
E
X the le.
13. Check whether the Preview menu is available in this le. Use it to generate previews
for the document.
If this barfs and tells you that image type png is not supported, you can either add
PNG support to your Emacs installation or choose another image format to be used by
preview-latex.
Adding support for an image format usually involves the installation of a library, e.g.
from http://gnuwin32.sf.net/. If you got your Emacs from gnu.org you might want
to check its README le for details.
A dierent image format can be chosen by setting the variable preview-image-type.
While it is recommended to keep the dvipng or png setting, you can temporarily
select a dierent format like pnm to check if the lack of PNG support is the only
problem with your Emacs installation.
Try adding the line
(setq preview-image-type pnm)
to your init le for a quick test. You should remove the line after the test again, because
PNM les take away vast amounts of disk space, and thus also of load/save time.
Well, that about is all. Have fun!
1.2.8 Customizing
Most of the site-specic customization should already have happened during conguration
of AUCT
E
X. Any further customization can be done with customization buers directly
in Emacs. Just type M-x customize-group RET AUCTeX RET to open the customization
group for AUCT
E
X or use the menu entries provided in the mode menus. Editing the le
tex-site.el as suggested in former versions of AUCT
E
X should not be done anymore
because the installation routine will overwrite those changes.
You might check some variables with a special signicance. They are accessible directly
by typing M-x customize-variable RET <variable> RET.
[User Option] TeX-macro-global
Directories containing the sites T
E
X style les.
Normally, AUCT
E
X will only allow you to complete macros and environments which are
built-in, specied in AUCT
E
X style les or dened by yourself. If you issue the M-x TeX-
auto-generate-global command after loading AUCT
E
X, you will be able to complete on
all macros available in the standard style les used by your document. To do this, you
must set this variable to a list of directories where the standard style les are located. The
Chapter 1: Introduction 16
directories will be searched recursively, so there is no reason to list subdirectories explicitly.
Automatic conguration will already have set the variable for you if it could use the program
kpsewhich. In this case you normally dont have to alter anything.
1.3 Quick Start
AUCT
E
X is a powerful program oering many features and conguration options. If you are
new to AUCT
E
X this might be deterrent. Fortunately you do not have to learn everything at
once. This Quick Start Guide will give you the knowledge of the most important commands
and enable you to prepare your rst L
a
T
E
X document with AUCT
E
X after only a few minutes
of reading.
In this introduction, we assume that AUCT
E
X is already installed on your system. If
this is not the case, you should read the le INSTALL in the base directory of the unpacked
distribution tarball. These installation instructions are available in this manual as well,
Section 1.2 [Installation], page 3. We also assume that you are familiar with the way
keystrokes are written in Emacs manuals. If not, have a look at the Emacs Tutorial in the
Help menu.
If AUCT
E
X is installed, you might still need to activate it, by inserting
(load "auctex.el" nil t t)
in your user init le.
1
If youve installed AUCT
E
X from the Emacs package manager
(ELPA), you must not have this line in your user init le. The installation procedure already
cares about loading AUCT
E
X correctly.
In order to get support for many of the L
a
T
E
X packages you will use in your documents,
you should enable document parsing as well, which can be achieved by putting
(setq TeX-auto-save t)
(setq TeX-parse-self t)
into your init le. Finally, if you often use \include or \input, you should make
AUCT
E
X aware of the multi-le document structure. You can do this by inserting
(setq-default TeX-master nil)
into your init le. Each time you open a new le, AUCT
E
X will then ask you for a
master le.
This Quick Start Guide covers two main topics: First we explain how AUCT
E
X helps
you in editing your input le for T
E
X, L
a
T
E
X, and some other formats. Then we describe
the functions that AUCT
E
X provides for processing the input les with L
a
T
E
X, BibT
E
X,
etc., and for viewing and debugging.
1.3.1 Functions for editing TeX les
1.3.1.1 Making your T
E
X code more readable
AUCT
E
X can do syntax highlighting of your source code, that means commands will get
special colors or fonts. You can enable it locally by typing M-x font-lock-mode RET. If you
want to have font locking activated generally, enable global-font-lock-mode, e.g. with
M-x customize-variable RET global-font-lock-mode RET.
1
This usually is a le in your home directory called .emacs if you are utilizing GNU Emacs or
.xemacs/init.el if you are using XEmacs.
Chapter 1: Introduction 17
AUCT
E
X will indent new lines to indicate their syntactical relationship to the surround-
ing text. For example, the text of a \footnote or text inside of an environment will be
indented relative to the text around it. If the indenting has gotten wrong after adding or
deleting some characters, use TAB to reindent the line, M-q for the whole paragraph, or
M-x LaTeX-fill-buffer RET for the whole buer.
1.3.1.2 Entering sectioning commands
Insertion of sectioning macros, that is \chapter, \section, \subsection, etc. and
accompanying \label commands may be eased by using C-c C-s. You will be asked for
the section level. As nearly everywhere in AUCT
E
X, you can use the TAB or SPC key to
get a list of available level names, and to auto-complete what you started typing. Next, you
will be asked for the printed title of the section, and last you will be asked for a label to be
associated with the section.
1.3.1.3 Inserting environments
Similarly, you can insert environments, that is \begin{}\end{} pairs: Type C-c C-e,
and select an environment type. Again, you can use TAB or SPC to get a list, and to com-
plete what you type. Actually, the list will not only provide standard L
a
T
E
X environments,
but also take your \documentclass and \usepackage commands into account if you
have parsing enabled by setting TeX-parse-self to t. If you use a couple of environments
frequently, you can use the up and down arrow keys (or M-p and M-n) in the minibuer to
get back to the previously inserted commands.
Some environments need additional arguments. Often, AUCT
E
X knows about this and
asks you to enter a value.
1.3.1.4 Inserting macros
C-c C-m, or simply C-c RET will give you a prompt that asks you for a L
a
T
E
X macro. You
can use TAB for completion, or the up/down arrow keys (or M-p and M-n) to browse the
command history. In many cases, AUCT
E
X knows which arguments a macro needs and will
ask you for that. It even can dierentiate between mandatory and optional argumentsfor
details, see Section 2.6 [Completion], page 27.
An additional help for inserting macros is provided by the possibility to complete macros
right in the buer. With point at the end of a partially written macro, you can complete it
by typing M-TAB.
1.3.1.5 Changing the font
AUCT
E
X provides convenient keyboard shortcuts for inserting macros which specify the
font to be used for typesetting certain parts of the text. They start with C-c C-f, and the
last C- combination tells AUCT
E
X which font you want:
C-c C-f C-b
Insert bold face \textbf{} text.
C-c C-f C-i
Insert italics \textit{} text.
C-c C-f C-e
Insert emphasized \emph{} text.
Chapter 1: Introduction 18
C-c C-f C-s
Insert slanted \textsl{} text.
C-c C-f C-r
Insert roman \textrm{} text.
C-c C-f C-f
Insert sans serif \textsf{} text.
C-c C-f C-t
Insert typewriter \texttt{} text.
C-c C-f C-c
Insert small caps \textsc{} text.
C-c C-f C-d
Delete the innermost font specication containing point.
If you want to change font attributes of existing text, mark it as a region, and then
invoke the commands. If no region is selected, the command will be inserted with empty
braces, and you can start typing the changed text.
Most of those commands will also work in math mode, but then macros like \mathbf
will be inserted.
1.3.1.6 Other useful features
AUCT
E
X also tries to help you when inserting the right quote signs for your language,
dollar signs to typeset math, or pairs of braces. It oers shortcuts for commenting out text
(C-c ; for the current region or C-c % for the paragraph you are in). The same keystrokes
will remove the % signs, if the region or paragraph is commented out yet. With TeX-
fold-mode, you can hide certain parts (like footnotes, references etc.) that you do not edit
currently. Support for Emacs outline mode is provided as well. And theres more, but this
is beyond the scope of this Quick Start Guide.
1.3.2 Creating and viewing output, debugging
1.3.2.1 One Command for L
a
T
E
X, helpers, viewers, and printing
If you have typed some text and want to run L
a
T
E
X (or T
E
X, or other programssee below)
on it, type C-c C-c. If applicable, you will be asked whether you want to save changes,
and which program you want to invoke. In many cases, the choice that AUCT
E
X suggests
will be just what you want: rst latex, then a viewer. If a latex run produces or changes
input les for makeindex, the next suggestion will be to run that program, and AUCT
E
X
knows that you need to run latex again afterwardsthe same holds for BibT
E
X.
When no processor invocation is necessary anymore, AUCT
E
X will suggest to run a
viewer, or you can chose to create a PostScript le using dvips, or to directly print it.
At this place, a warning needs to be given: First, although AUCT
E
X is really good
in detecting the standard situations when an additional latex run is necessary, it cannot
detect it always. Second, the creation of PostScript les or direct printing currently only
works when your output le is a DVI le, not a PDF le.
Ah, you didnt know you can do both? That brings us to the next topic.
Chapter 1: Introduction 19
1.3.2.2 Choosing an output format
From a L
a
T
E
X le, you can produce DVI output, or a PDF le directly via pdflatex. You
can switch on source specials for easier navigation in the output le, or tell latex to stop
after an error (usually \noninteractive is used, to allow you to detect all errors in a single
run).
These options are controlled by toggles, the keystrokes should be easy to memorize:
C-c C-t C-p
This command toggles between DVI and PDF output
C-c C-t C-i
toggles interactive mode
C-c C-t C-s
toggles source specials support
C-c C-t C-o
toggles usage of Omega/lambda.
1.3.2.3 Debugging L
a
T
E
X
When AUCT
E
X runs a program, it creates an output buer in which it displays the output of
the command. If there is a syntactical error in your le, latex will not complete successfully.
AUCT
E
X will tell you that, and you can get to the place where the rst error occured by
pressing C-c (the last character is a backtick). The view will be split in two windows,
the output will be displayed in the lower buer, and both buers will be centered around
the place where the error ocurred. You can then try to x it in the document buer, and
use the same keystrokes to get to the next error. This procedure may be repeated until
all errors have been dealt with. By pressing C-c C-w (TeX-toggle-debug-boxes) you can
toggle whether AUCT
E
X should notify you of overfull and underfull boxes in addition to
regular errors.
If a command got stuck in a seemingly innite loop, or you want to stop execution for
other reasons, you can use C-c C-k (for kill). Similar to C-l, which centers the buer
you are in around your current position, C-c C-l centers the output buer so that the last
lines added at the bottom become visible.
1.3.2.4 Running L
a
T
E
X on parts of your document
If you want to check how some part of your text looks like, and do not want to wait until
the whole document has been typeset, then mark it as a region and use C-c C-r. It behaves
just like C-c C-c, but it only uses the document preamble and the region you marked.
If you are using \include or \input to structure your document, try C-c C-b while you
are editing one of the included les. It will run latex only on the current buer, using the
preamble from the master le.
Chapter 2: Editing the Document Source 20
2 Editing the Document Source
The most commonly used commands/macros of AUCT
E
X are those which simply insert
templates for often used T
E
X, L
a
T
E
X, or ConT
E
Xt constructs, like font changes, handling of
environments, etc. These features are very simple, and easy to learn, and help you avoid
mistakes like mismatched braces, or \begin{}-\end{} pairs.
Apart from that this chapter contains a description of some features for entering more
specialized sorts of text, for formatting the source by indenting and lling and for navigating
through the document.
2.1 Insertion of Quotes, Dollars, and Braces
Quotation Marks
In T
E
X, literal double quotes "like this" are seldom used, instead two single quotes are
used like this. To help you insert these eciently, AUCT
E
X allows you to continue
to press " to insert two single quotes. To get a literal double quote, press " twice.
[Command] TeX-insert-quote count
(") Insert the appropriate quote marks for T
E
X.
Inserts the value of TeX-open-quote (normally ) or TeX-close-quote (normally
) depending on the context. With prex argument, always inserts " characters.
[User Option] TeX-open-quote
String inserted by typing " to open a quotation. (See Section 5.4.1 [European],
page 58, for language-specic quotation mark insertion.)
[User Option] TeX-close-quote
String inserted by typing " to close a quotation. (See Section 5.4.1 [European],
page 58, for language-specic quotation mark insertion.)
[User Option] TeX-quote-after-quote
Determines the behavior of ". If it is non-nil, typing " will insert a literal double quote.
The respective values of TeX-open-quote and TeX-close-quote will be inserted after
typing " once again.
The babel package provides special support for the requirements of typesetting quo-
tation marks in many dierent languages. If you use this package, either directly or by
loading a language-specic style le, you should also use the special commands for quote
insertion instead of the standard quotes shown above. AUCT
E
X is able to recognize several
of these languages and will change quote insertion accordingly. See Section 5.4.1 [European],
page 58, for details about this feature and how to control it.
In case you are using the csquotes package, you should customize LaTeX-csquotes-
open-quote, LaTeX-csquotes-close-quote and LaTeX-csquotes-quote-after-quote.
The quotation characters will only be used if both variablesLaTeX-csquotes-open-quote
and LaTeX-csquotes-close-quoteare non-empty strings. But then the csquotes-
related values will take precedence over the language-specic ones.
Chapter 2: Editing the Document Source 21
Dollar Signs
In AUCT
E
X, dollar signs should match like they do in T
E
X. This has been partially imple-
mented, we assume dollar signs always match within a paragraph. The rst $ you insert
in a paragraph will do nothing special. The second $ will match the rst. This will be
indicated by moving the cursor temporarily over the rst dollar sign.
[Command] TeX-insert-dollar arg
($) Insert dollar sign.
Show matching dollar sign if this dollar sign end the T
E
X math mode. Ensure double
dollar signs match up correctly by inserting extra dollar signs when needed if TeX-
math-close-double-dollar is non-nil.
With optional arg, insert that many dollar signs.
[User Option] TeX-math-close-double-dollar
Control the insertion of double dollar signs for delimiting display math. (Note that
you should not use double dollar signs in L
a
T
E
X because this practice can lead to
wrong spacing in typeset documents.) If the variable is non-nil and you enter a dollar
sign that matches a double dollar sign $$ AUCT
E
X will automatically insert two
dollar signs.
Braces
To avoid unbalanced braces, it is useful to insert them pairwise. You can do this by typing
C-c {.
[Command] TeX-insert-braces
(C-c {) Make a pair of braces and position the cursor to type inside of them. If there
is an active region, put braces around it and leave point after the closing brace.
2.2 Inserting Font Speciers
Perhaps the most used keyboard commands of AUCT
E
X are the short-cuts available for
easy insertion of font changing macros.
If you give an argument (that is, type C-u) to the font command, the innermost font will
be replaced, i.e. the font in the T
E
X group around point will be changed. The following
table shows the available commands, with indicating the position where the text will be
inserted.
C-c C-f C-b
Insert bold face \textbf{} text.
C-c C-f C-i
Insert italics \textit{} text.
C-c C-f C-e
Insert emphasized \emph{} text.
C-c C-f C-s
Insert slanted \textsl{} text.
C-c C-f C-r
Insert roman \textrm{} text.
Chapter 2: Editing the Document Source 22
C-c C-f C-f
Insert sans serif \textsf{} text.
C-c C-f C-t
Insert typewriter \texttt{} text.
C-c C-f C-c
Insert small caps \textsc{} text.
C-c C-f C-d
Delete the innermost font specication containing point.
[Command] TeX-font replace what
(C-c C-f) Insert template for font change command.
If replace is not nil, replace current font. what determines the font to use, as specied
by TeX-font-list.
[User Option] TeX-font-list
List of fonts used by TeX-font.
Each entry is a list with three elements. The rst element is the key to activate the
font. The second element is the string to insert before point, and the third element
is the string to insert after point. An optional fourth element means always replace
if not nil.
[User Option] LaTeX-font-list
List of fonts used by TeX-font in LaTeX mode. It has the same structure as TeX-
font-list.
2.3 Inserting chapters, sections, etc.
Insertion of sectioning macros, that is \chapter, \section, \subsection, etc. and
accompanying \labels may be eased by using C-c C-s. This command is highly cus-
tomizable, the following describes the default behavior.
When invoking you will be asked for a section macro to insert. An appropriate default is
automatically selected by AUCT
E
X, that is either: at the top of the document; the top level
sectioning for that document style, and any other place: The same as the last occurring
sectioning command.
Next, you will be asked for the actual name of that section, and last you will be asked for
a label to be associated with that section. The label will be prexed by the value specied
in LaTeX-section-hook.
[Command] LaTeX-section arg
(C-c C-s) Insert a sectioning command.
Determine the type of section to be inserted, by the argument arg.
If arg is nil or missing, use the current level.
If arg is a list (selected by C-u), go downward one level.
If arg is negative, go up that many levels.
If arg is positive or zero, use absolute level:
Chapter 2: Editing the Document Source 23
+ 0 : part
+ 1 : chapter
+ 2 : section
+ 3 : subsection
+ 4 : subsubsection
+ 5 : paragraph
+ 6 : subparagraph
The following variables can be set to customize the function.
LaTeX-section-hook
Hooks to be run when inserting a section.
LaTeX-section-label
Prex to all section references.
The precise behavior of LaTeX-section is dened by the contents of LaTeX-section-
hook.
[User Option] LaTeX-section-hook
List of hooks to run when a new section is inserted.
The following variables are set before the hooks are run
level Numeric section level, default set by prex arg to LaTeX-section.
name Name of the sectioning command, derived from level.
title The title of the section, default to an empty string.
toc Entry for the table of contents list, default nil.
done-mark
Position of point afterwards, default nil meaning after the inserted text.
A number of hooks are already dened. Most likely, you will be able to get the desired
functionality by choosing from these hooks.
LaTeX-section-heading
Query the user about the name of the sectioning command. Modies
level and name.
LaTeX-section-title
Query the user about the title of the section. Modies title.
LaTeX-section-toc
Query the user for the toc entry. Modies toc.
LaTeX-section-section
Insert L
a
T
E
X section command according to name, title, and toc. If toc is
nil, no toc entry is inserted. If toc or title are empty strings, done-mark
will be placed at the point they should be inserted.
LaTeX-section-label
Insert a label after the section command. Controlled by the variable
LaTeX-section-label.
Chapter 2: Editing the Document Source 24
To get a full featured LaTeX-section command, insert
(setq LaTeX-section-hook
(LaTeX-section-heading
LaTeX-section-title
LaTeX-section-toc
LaTeX-section-section
LaTeX-section-label))
in your .emacs le.
The behavior of LaTeX-section-label is determined by the variable LaTeX-section-
label.
[User Option] LaTeX-section-label
Default prex when asking for a label.
If it is a string, it is used unchanged for all kinds of sections. If it is nil, no label is
inserted. If it is a list, the list is searched for a member whose car is equal to the
name of the sectioning command being inserted. The cdr is then used as the prex.
If the name is not found, or if the cdr is nil, no label is inserted.
By default, chapters have a prex of cha: while sections and subsections have a
prex of sec:. Labels are not automatically inserted for other types of sections.
2.4 Inserting Environment Templates
A large apparatus is available that supports insertions of environments, that is \begin{}
\end{} pairs.
AUCT
E
X is aware of most of the actual environments available in a specic document.
This is achieved by examining your \documentclass command, and consulting a precom-
piled list of environments available in a large number of styles.
You insert an environment with C-c C-e, and select an environment type. Depending on
the environment, AUCT
E
X may ask more questions about the optional parts of the selected
environment type. With C-u C-c C-e you will change the current environment.
[Command] LaTeX-environment arg
(C-c C-e) AUCT
E
X will prompt you for an environment to insert. At this prompt,
you may press TAB or SPC to complete a partially written name, and/or to get a
list of available environments. After selection of a specic environment AUCT
E
X may
prompt you for further specications.
If the optional argument arg is not-nil (i.e. you have given a prex argument), the
current environment is modied and no new environment is inserted.
As a default selection, AUCT
E
X will suggest the environment last inserted or, as the
rst choice the value of the variable LaTeX-default-environment.
[User Option] LaTeX-default-environment
Default environment to insert when invoking LaTeX-environment rst time.
Chapter 2: Editing the Document Source 25
If the document is empty, or the cursor is placed at the top of the document, AUCT
E
X
will default to insert a document environment.
Most of these are described further in the following sections, and you may easily specify
more. See Section 2.4.5 [Customizing Environments], page 26.
You can close the current environment with C-c ], but we suggest that you use C-c C-e
to insert complete environments instead.
[Command] LaTeX-close-environment
(C-c ]) Insert an \end that matches the current environment.
2.4.1 Equations
When inserting equation-like environments, the \label will have a default prex, which
is controlled by the following variables:
[User Option] LaTeX-equation-label
Prex to use for equation labels.
[User Option] LaTeX-eqnarray-label
Prex to use for eqnarray labels.
[User Option] LaTeX-amsmath-label
Prex to use for amsmath equation labels. Amsmath equations include align,
alignat, xalignat, aligned, flalign and gather.
2.4.2 Floats
Figures and tables (i.e., oats) may also be inserted using AUCT
E
X. After choosing either
gure or table in the environment list described above, you will be prompted for a number
of additional things.
oat position
This is the optional argument of oat environments that controls how they
are placed in the nal document. In L
a
T
E
X this is a sequence of the letters
htbp as described in the L
a
T
E
X manual. The value will default to the value of
LaTeX-float.
caption This is the caption of the oat. The default is to insert the caption at the
bottom of the oat. You can specify oats where the caption should be placed
at the top with LaTeX-top-caption-list.
label The label of this oat. The label will have a default prex, which is controlled
by the variables LaTeX-figure-label and LaTeX-table-label.
Moreover, you will be asked if you want the contents of the oat environment to be
horizontally centered. Upon a positive answer a \centering macro will be inserted at the
beginning of the oat environment.
[User Option] LaTeX-float
Default placement for oats.
[User Option] LaTeX-figure-label
Prex to use for gure labels.
Chapter 2: Editing the Document Source 26
[User Option] LaTeX-table-label
Prex to use for table labels.
[User Option] LaTeX-top-caption-list
List of oat environments with top caption.
2.4.3 Itemize-like Environments
In an itemize-like environment, nodes (i.e., \items) may be inserted using C-c LFD.
[Command] LaTeX-insert-item
(C-c LFD) Close the current item, move to the next line and insert an appropriate
\item for the current environment. That is, itemize and enumerate will have
\item inserted, while description will have \item[] inserted.
2.4.4 Tabular-like Environments
When inserting Tabular-like environments, that is, tabular array etc., you will be
prompted for a template for that environment. Related variables:
[User Option] LaTeX-default-format
Default format string for array and tabular environments.
[User Option] LaTeX-default-position
Default position string for array and tabular environments. If nil, act like the empty
string is given, but dont prompt for a position.
2.4.5 Customizing Environments
See Section 5.6.3 [Adding Environments], page 67, for how to customize the list of known
environments.
2.5 Entering Mathematics
T
E
X is written by a mathematician, and has always contained good support for formatting
mathematical text. AUCT
E
X supports this tradition, by oering a special minor mode for
entering text with many mathematical symbols. You can enter this mode by typing C-c ~.
[Command] LaTeX-math-mode
(C-c ~) Toggle LaTeX Math mode. This is a minor mode rebinding the key LaTeX-
math-abbrev-prefix to allow easy typing of mathematical symbols. will read
a character from the keyboard, and insert the symbol as specied in LaTeX-math-
default and LaTeX-math-list. If given a prex argument, the symbol will be sur-
rounded by dollar signs.
You can use another prex key (instead of ) by setting the variable LaTeX-math-
abbrev-prefix.
To enable LaTeX Math mode by default, add the following in your .emacs le:
(add-hook LaTeX-mode-hook LaTeX-math-mode)
Chapter 2: Editing the Document Source 27
[User Option] LaTeX-math-abbrev-prefix
A string containing the prex of LaTeX-math-mode commands; This value defaults to
.
The string has to be a key or key sequence in a format understood by the kbd macro.
This corresponds to the syntax usually used in the manuals for Emacs Emacs Lisp.
The variable LaTeX-math-list allows you to add your own mappings.
[User Option] LaTeX-math-list
A list containing user-dened keys and commands to be used in LaTeX Math mode.
Each entry should be a list of two to four elements.
First, the key to be used after LaTeX-math-abbrev-prefix for macro insertion. If it
is nil, the symbol has no associated keystroke (it is available in the menu, though).
Second, a string representing the name of the macro (without a leading backslash.)
Third, a string representing the name of a submenu the command should be added
to. Use a list of strings in case of nested menus.
Fourth, the position of a Unicode character to be displayed in the menu alongside the
macro name. This is an integer value.
[User Option] LaTeX-math-menu-unicode
Whether the LaTeX menu should try using Unicode for eect. Your Emacs built
must be able to display include Unicode characters in menus for this feature.
AUCT
E
Xs reference card tex-ref.tex includes a list of all math mode commands.
AUCT
E
X can help you write subscripts and superscripts in math constructs by au-
tomatically inserting a pair of braces after typing or ^ respectively and putting point
between the braces. In order to enable this feature, set the variable TeX-electric-sub-
and-superscript to a non-nil value.
[User Option] TeX-electric-sub-and-superscript
If non-nil, insert braces after typing ^ and in math mode.
2.6 Completion
Emacs lisp programmers probably know the lisp-complete-symbol command, usually
bound to M-TAB. Users of the wonderful ispell mode know and love the ispell-complete-
word command from that package. Similarly, AUCT
E
X has a TeX-complete-symbol com-
mand, by default bound to M-TAB which is equivalent to M-C-i. Using TeX-complete-
symbol makes it easier to type and remember the names of long L
a
T
E
X macros.
In order to use TeX-complete-symbol, you should write a backslash and the start of the
macro. Typing M-TAB will now complete as much of the macro, as it unambiguously can.
For example, if you type \renewc and then M-TAB, it will expand to \renewcommand.
[Command] TeX-complete-symbol
(M-TAB) Complete T
E
X symbol before point.
Chapter 2: Editing the Document Source 28
A more direct way to insert a macro is with TeX-insert-macro, bound to C-c C-m
which is equivalent to C-c RET. It has the advantage over completion that it knows about
the argument of most standard L
a
T
E
X macros, and will prompt for them. It also knows
about the type of the arguments, so it will for example give completion for the argument
to \include. Some examples are listed below.
[Command] TeX-insert-macro
(C-c C-m or C-c RET) Prompt (with completion) for the name of a T
E
X macro, and
if AUCT
E
X knows the macro, prompt for each argument.
As a default selection, AUCT
E
X will suggest the macro last inserted or, as the rst choice
the value of the variable TeX-default-macro.
[User Option] TeX-insert-macro-default-style
Species whether TeX-insert-macro will ask for all optional arguments.
If set to the symbol show-optional-args, TeX-insert-macro asks for optional argu-
ments of T
E
X macros. If set to mandatory-args-only, TeX-insert-macro asks only
for mandatory arguments. When TeX-insert-macro is called with prex argument
(C-u), its the other way round.
Note that for some macros, there are special mechanisms, e.g. LaTeX-
includegraphics-options-alist.
[User Option] TeX-default-macro
Default macro to insert when invoking TeX-insert-macro rst time.
A faster alternative is to bind the function TeX-electric-macro to \. This can be
done by setting the variable TeX-electric-escape
[User Option] TeX-electric-escape
If this is non-nil when AUCT
E
X is loaded, the T
E
X escape character \ will be bound
to TeX-electric-macro
The dierence between TeX-insert-macro and TeX-electric-macro is that space will
complete and exit from the minibuer in TeX-electric-macro. Use TAB if you merely
want to complete.
[Command] TeX-electric-macro
Prompt (with completion) for the name of a T
E
X macro, and if AUCT
E
X knows the
macro, prompt for each argument. Space will complete and exit.
By default AUCT
E
X will put an empty set braces {} after a macro with no arguments to
stop it from eating the next whitespace. This can be stopped by entering LaTeX-math-mode,
see Section 2.5 [Mathematics], page 26, or by setting TeX-insert-braces to nil.
[User Option] TeX-insert-braces
If non-nil, append a empty pair of braces after inserting a macro.
Completions work because AUCT
E
X can analyze T
E
X les, and store symbols in Emacs
Lisp les for later retrieval. See Section 5.5 [Automatic], page 61, for more information.
Chapter 2: Editing the Document Source 29
AUCT
E
X will also make completion for many macro arguments, for example existing
labels when you enter a \ref macro with TeX-insert-macro or TeX-electric-macro,
and BibT
E
X entries when you enter a \cite macro. For this kind of completion to work,
parsing must be enabled as described in see Section 5.3 [Parsing Files], page 56. For
\cite you must also make sure that the BibT
E
X les have been saved at least once after
you enabled automatic parsing on save, and that the basename of the BibT
E
X le does not
conict with the basename of one of T
E
X les.
2.7 Marking Environments, Sections, or Texinfo Nodes
You can mark the current environment by typing C-c ., or the current section by typing
C-c *.
In Texinfo documents you can type M-C-h to mark the current node.
When the region is set, the point is moved to its beginning and the mark to its end.
2.7.1 LaTeX Commands for Marking Environments and Sections
[Command] LaTeX-mark-section
(C-c *) Set mark at end of current logical section, and point at top.
With a non-nil prex argument, mark only the region from the current section start to
the next sectioning command. Thereby subsections are not being marked. Otherwise,
any included subsections are also marked along with current section.
[Command] LaTeX-mark-environment
(C-c .) Set mark to the end of the current environment and point to the matching
beginning.
If a prex argument is given, mark the respective number of enclosing environments.
The command will not work properly if there are unbalanced begin-end pairs in
comments and verbatim environments.
2.7.2 Texinfo Commands for Marking Environments and Sections
[Command] Texinfo-mark-section
(C-c *) Mark the current section, with inclusion of any containing node.
The current section is detected as starting by any of the structuring commands
matched by the regular expression in the variable outline-regexp which in turn
is a regular expression matching any element of the variable texinfo-section-list.
With a non-nil prex argument, mark only the region from the current section start to
the next sectioning command. Thereby subsections are not being marked. Otherwise,
any included subsections are also marked
Note that when the current section is starting immediately after a node command,
then the node command is also marked as part of the section.
[Command] Texinfo-mark-environment
(C-c .) Set mark to the end of the current environment and point to the matching
beginning.
Chapter 2: Editing the Document Source 30
If a prex argument is given, mark the respective number of enclosing environments.
The command will not work properly if there are unbalanced begin-end pairs in
comments and verbatim environments.
[Command] Texinfo-mark-node
(M-C-h) Mark the current node. This is the node in which point is located. It is start-
ing at the previous occurrence of the keyword @node and ending at next occurrence
of the keywords @node or @bye.
2.8 Commenting
It is often necessary to comment out temporarily a region of T
E
X or L
a
T
E
X code. This
can be done with the commands C-c ; and C-c %. C-c ; will comment out all lines in the
current region, while C-c % will comment out the current paragraph. Type C-c ; again to
uncomment all lines of a commented region, or C-c % again to uncomment all comment
lines around point. These commands will insert or remove a single % respectively.
[Command] TeX-comment-or-uncomment-region
(C-c ;) Add or remove % from the beginning of each line in the current region. Un-
commenting works only if the region encloses solely commented lines. If AUCT
E
X
should not try to guess if the region should be commented or uncommented the com-
mands TeX-comment-region and TeX-uncomment-region can be used to explicitly
comment or uncomment the region in concern.
[Command] TeX-comment-or-uncomment-paragraph
(C-c %) Add or remove % from the beginning of each line in the current paragraph.
When removing % characters the paragraph is considered to consist of all preceding
and succeeding lines starting with a %, until the rst non-comment line.
2.9 Indenting
Indentation means the addition of whitespace at the beginning of lines to reect special
syntactical constructs. This makes it easier to see the structure of the document, and to
catch errors such as a missing closing brace. Thus, the indentation is done for precisely the
same reasons that you would indent ordinary computer programs.
Indentation is done by L
a
T
E
X environments and by T
E
X groups, that is the body of
an environment is indented by the value of LaTeX-indent-level (default 2). Also, items
of an itemize-like environment are indented by the value of LaTeX-item-indent, default
2. (Items are identied with the help of LaTeX-item-regexp.) If more environments are
nested, they are indented accumulated just like most programming languages usually are
seen indented in nested constructs.
You can explicitely indent single lines, usually by pressing TAB, or marked regions by
calling indent-region on it. If you have auto-fill-mode enabled and a line is broken
while you type it, Emacs automatically cares about the indentation in the following line.
If you want to have a similar behavior upon typing RET, you can customize the variable
TeX-newline-function and change the default of newline which does no indentation to
newline-and-indent which indents the new line or reindent-then-newline-and-indent
which indents both the current and the new line.
Chapter 2: Editing the Document Source 31
There are certain L
a
T
E
X environments which should be indented in a special way, like
tabular or verbatim. Those environments may be specied in the variable LaTeX-
indent-environment-list together with their special indentation functions. Taking the
verbatim environment as an example you can see that current-indentation is used
as the indentation function. This will stop AUCT
E
X from doing any indentation in the
environment if you hit TAB for example.
There are environments in LaTeX-indent-environment-list which do not bring a spe-
cial indentation function with them. This is due to the fact that rst the respective functions
are not implemented yet and second that lling will be disabled for the specied environ-
ments. This shall prevent the source code from being messed up by accidently lling those
environments with the standard lling routine. If you think that providing special lling
routines for such environments would be an appropriate and challenging task for you, you
are invited to contribute. (See Section 2.10 [Filling], page 32, for further information about
the lling functionality)
The check for the indentation function may be enabled or disabled by customizing the
variable LaTeX-indent-environment-check.
As a side note with regard to formatting special environments: Newer Emacsen include
align.el and therefore provide some support for formatting tabular and tabbing
environments with the function align-current which will nicely align columns in the source
code.
AUCT
E
X is able to format commented parts of your code just as any other part. This
means L
a
T
E
X environments and T
E
X groups in comments will be indented syntactically
correct if the variable LaTeX-syntactic-comments is set to t. If you disable it, comments
will be lled like normal text and no syntactic indentation will be done.
Following you will nd a list of most commands and variables related to indenting with
a small summary in each case:
TAB LaTeX-indent-line will indent the current line.
LFD newline-and-indent inserts a new line (much like RET) and moves the cursor
to an appropriate position by the left margin.
Most keyboards nowadays lack a linefeed key and C-j may be tedious to type.
Therefore you can customize AUCT
E
X to perform indentation upon typing RET
as well. The respective option is called TeX-newline-function.
C-j Alias for LFD
[User Option] LaTeX-indent-environment-list
List of environments with special indentation. The second element in each entry is
the function to calculate the indentation level in columns.
The lling code currently cannot handle tabular-like environments which will be com-
pletely messed-up if you try to format them. This is why most of these environments
are included in this customization option without a special indentation function. This
will prevent that they get lled.
[User Option] LaTeX-indent-level
Number of spaces to add to the indentation for each \begin not matched by a \end.
Chapter 2: Editing the Document Source 32
[User Option] LaTeX-item-indent
Number of spaces to add to the indentation for \items in list environments.
[User Option] TeX-brace-indent-level
Number of spaces to add to the indentation for each { not matched by a }.
[User Option] LaTeX-syntactic-comments
If non-nil comments will be lled and indented according to L
a
T
E
X syntax. Otherwise
they will be lled like normal text.
[User Option] TeX-newline-function
Used to specify the function which is called when RET is pressed. This will normally
be newline which simply inserts a new line. In case you want to have AUCT
E
X do
indentation as well when you press RET, use the built-in functions newline-and-
indent or reindent-then-newline-and-indent. The former inserts a new line and
indents the following line, i.e. it moves the cursor to the right position and therefore
acts as if you pressed LFD. The latter function additionally indents the current line.
If you choose Other, you can specify your own fancy function to be called when
RET is pressed.
2.10 Filling
Filling deals with the insertion of line breaks to prevent lines from becoming wider than what
is specied in fill-column. The linebreaks will be inserted automatically if auto-fill-
mode is enabled. In this case the source is not only lled but also indented automatically
as you write it.
auto-fill-mode can be enabled for AUCT
E
X by calling turn-on-auto-fill in one of
the hooks AUCT
E
X is running. See Section 5.1 [Modes and Hooks], page 54. As an example,
if you want to enable auto-fill-mode in LaTeX-mode, put the following into your init le:
(add-hook LaTeX-mode-hook turn-on-auto-fill)
You can manually ll explicitely marked regions, paragraphs, environments, complete
sections, or the whole buer. (Note that manual lling in AUCT
E
X will indent the start of
the region to be lled in contrast to many other Emacs modes.)
There are some syntactical constructs which are handled specially with regard to lling.
These are so-called code comments and paragraph commands.
Code comments are comments preceded by code or text in the same line. Upon lling
a region, code comments themselves will not get lled. Filling is done from the start of
the region to the line with the code comment and continues after it. In order to prevent
overfull lines in the source code, a linebreak will be inserted before the last non-comment
word by default. This can be changed by customizing LaTeX-fill-break-before-code-
comments. If you have overfull lines with code comments you can ll those explicitely by
calling LaTeX-fill-paragraph or pressing M-q with the cursor positioned on them. This
will add linebreaks in the comment and indent subsequent comment lines to the column of
the comment in the rst line of the code comment. In this special case M-q only acts on the
current line and not on the whole paragraph.
Lines with \par are treated similarly to code comments, i.e. \par will be treated
as paragraph boundary which should not be followed by other code or text. But it is not
Chapter 2: Editing the Document Source 33
treated as a real paragraph boundary like an empty line where lling a paragraph would
stop.
Paragraph commands like \section or \noindent (the list of commands is dened by
LaTeX-paragraph-commands) are often to be placed in their own line(s). This means they
should not be consecuted with any preceding or following adjacent lines of text. AUCT
E
X
will prevent this from happening if you do not put any text except another macro after
the end of the last brace of the respective macro. If there is other text after the macro,
AUCT
E
X regards this as a sign that the macro is part of the following paragraph.
Here are some examples:
\begin{quote}
text text text text
\begin{quote}\label{foo}
text text text text
If you press M-q on the rst line in both examples, nothing will change. But if you write
\begin{quote} text
text text text text
and press M-q, you will get
\begin{quote} text text text text text
Besides code comments and paragraph commands, another speciality of lling in
AUCT
E
X involves commented lines. You should be aware that these comments are treated
as islands in the rest of the L
a
T
E
X code if syntactic lling is enabled. This means, for exam-
ple, if you try to ll an environment with LaTeX-fill-environment and have the cursor
placed on a commented line which does not have a surrounding environment inside the
comment, AUCT
E
X will report an error.
The relevant commands and variables with regard to lling are:
C-c C-q C-p
LaTeX-fill-paragraph will ll and indent the current paragraph.
M-q Alias for C-c C-q C-p
C-c C-q C-e
LaTeX-fill-environment will ll and indent the current environment. This
may e.g. be the document environment, in which case the entire document
will be formatted.
C-c C-q C-s
LaTeX-fill-section will ll and indent the current logical sectional unit.
C-c C-q C-r
LaTeX-fill-region will ll and indent the current region.
[User Option] LaTeX-fill-break-at-separators
List of separators before or after which respectively linebreaks will be inserted if they
do not t into one line. The separators can be curly braces, brackets, switches for
inline math ($, \(, \)) and switches for display math (\[, \]). Such formatting
can be useful to make macros and math more visible or to prevent overfull lines in
the L
a
T
E
X source in case a package for displaying formatted T
E
X output inside the
Emacs buer, like preview-latex, is used.
Chapter 2: Editing the Document Source 34
[User Option] LaTeX-fill-break-before-code-comments
Code comments are comments preceded by some other text in the same line. When
a paragraph containing such a comment is to be lled, the comment start will be
seen as a border after which no line breaks will be inserted in the same line. If the
option LaTeX-fill-break-before-code-comments is enabled (which is the default)
and the comment does not t into the line, a line break will be inserted before the
last non-comment word to minimize the chance that the line becomes overfull.
Chapter 3: Controlling Screen Display 35
3 Controlling Screen Display
It is often desirable to get visual help of what markup code in a text actually does whithout
having to decipher it explicitely. For this purpose Emacs and AUCT
E
X provide font locking
(also known as syntax highlighting) which visually sets o markup code like macros or
environments by using dierent colors or fonts. For example text to be typeset in italics
can be displayed with an italic font in the editor as well, or labels and references get their
own distinct color.
While font locking helps you grasp the purpose of markup code and separate markup
from content, the markup code can still be distracting. AUCT
E
X lets you hide those parts
and show them again at request with its built-in support for hiding macros and environments
which we call folding here.
Besides folding of macros and environments, AUCT
E
X provides support for Emacs out-
line mode which lets you narrow the buer content to certain sections of your text by hiding
the parts not belonging to these sections.
3.1 Font Locking
Font locking is supposed to improve readability of the source code by highlighting certain
keywords with dierent colors or fonts. It thereby lets you recognize the function of markup
code to a certain extent without having to read the markup command. For general infor-
mation on controlling font locking with Emacs Font Lock mode, see Section Font Lock
Mode in GNU Emacs Manual.
[User Option] TeX-install-font-lock
Once font locking is enabled globally or for the major modes provided by AUCT
E
X,
the font locking patterns and functionality of font-latex are activated by default. You
can switch to a dierent font locking scheme or disable font locking in AUCT
E
X by
customizing the variable TeX-install-font-lock.
Besides font-latex AUCT
E
X ships with a scheme which is derived from Emacs default
L
a
T
E
X mode and activated by choosing tex-font-setup. Be aware that this scheme is
not coupled with AUCT
E
Xs style system and not the focus of development. Therefore
and due to font-latex being much more feature-rich the following explanations will only
cover font-latex.
In case you want to hook in your own fontication scheme, you can choose other and
insert the name of the function which sets up your font locking patterns. If you want
to disable fontication in AUCT
E
X completely, choose ignore.
font-latex provides many options for customization which are accessible with M-x
customize-group RET font-latex RET. For this description the various options are ex-
plained in conceptional groups.
3.1.1 Fontication of macros
Highlighting of macros can be customized by adapting keyword lists which can be found in
the customization group font-latex-keywords.
Three types of macros can be handled dierently with respect to fontication:
Chapter 3: Controlling Screen Display 36
1. Commands of the form \foo[bar]{baz} which consist of the macro itself, optional
arguments in square brackets and mandatory arguments in curly braces. For the com-
mand itself the face font-lock-keyword-face will be used and for the optional argu-
ments the face font-lock-variable-name-face. The face applied to the mandatory
argument depends on the macro class represented by the respective built-in variables.
2. Declaration macros of the form {\foo text} which consist of the macro which may
be enclosed in a T
E
X group together with text to be aected by the macro. In case a
T
E
X group is present, the macro will get the face font-lock-keyword-face and the
text will get the face congured for the respective macro class. If no T
E
X group is
present, the latter face will be applied to the macro itself.
3. Simple macros of the form \foo which do not have any arguments or groupings. The
respective face will be applied to the macro itself.
Customization variables for \foo[bar]{baz} type macros allow both the macro name
and the sequence of arguments to be specied. The latter is done with a string which can
contain the characters
* indicating the existence of a starred variant for the macro,
[ for optional arguments in brackets,
{ for mandatory arguments in braces,
\ for mandatory arguments consisting of a single macro and
| as a prex indicating that two alternatives are following.
For example the specier for \documentclass would be [{ because the macro has one
optional followed by one mandatory argument. The specier for \newcommand would be
*|{\[[{ because there is a starred variant, the mandatory argument following the macro
name can be a macro or a T
E
X group which can be followed by two optional arguments and
the last token is a mandatory argument in braces.
Customization variables for the {\foo text} and \foo types are simple lists of strings
where each entry is a macro name (without the leading backslash).
General macro classes
font-latex provides keyword lists for dierent macro classes which are described in the fol-
lowing table:
font-latex-match-function-keywords
Keywords for macros dening or related to functions, like \newcommand.
Type: \macro[...]{...}
Face: font-lock-function-name-face
font-latex-match-reference-keywords
Keywords for macros dening or related to references, like \ref.
Type: \macro[...]{...}
Face: font-lock-constant-face
font-latex-match-textual-keywords
Keywords for macros specifying textual content, like \caption.
Type: \macro[...]{...}
Face: font-lock-type-face
Chapter 3: Controlling Screen Display 37
font-latex-match-variable-keywords
Keywords for macros dening or related to variables, like \setlength.
Type: \macro[...]{...}
Face: font-lock-variable-name-face
font-latex-match-warning-keywords
Keywords for important macros, e.g. aecting line or page break, like
\clearpage.
Type: \macro
Face: font-latex-warning-face
Sectioning commands
Sectioning commands are macros like \chapter or \section. For these commands there
are two fontication schemes which may be selected by customizing the variable font-
latex-fontify-sectioning.
[User Option] font-latex-fontify-sectioning
Per default sectioning commands will be shown in a larger, proportional font, which
corresponds to a number for this variable. The font size varies with the section-
ing level, e.g. \part (font-latex-sectioning-0-face) has a larger font than
\paragraph (font-latex-sectioning-5-face). Typically, values from 1.05 to 1.3
for font-latex-fontify-sectioning give best results, depending on your font setup.
If you rather like to use the base font and a dierent color, set the variable to the
symbol color. In this case the face font-lock-type-face will be used to fontify
the argument of the sectioning commands.
You can make font-latex aware of your own sectioning commands be adding them to the
keyword lists: font-latex-match-sectioning-0-keywords (font-latex-sectioning-
0-face) . . . font-latex-match-sectioning-5-keywords (font-latex-sectioning-5-
face).
Related to sectioning there is special support for slide titles which may be fontied with
the face font-latex-slide-title-face. You can add macros which should appear in this
face by customizing the variable font-latex-match-slide-title-keywords.
Commands for changing fonts
L
a
T
E
X provides various macros for changing fonts or font attributes. For example, you can
select an italic font with \textit{...} or bold with \textbf{...}. An alternative way
to specify these fonts is to use special macros in T
E
X groups, like {\itshape ...} for
italics and {\bfseries ...} for bold. As mentioned above, we call the former variants
commands and the latter declarations.
Besides the macros for changing fonts provided by L
a
T
E
X there is an innite number of
other macroseither dened by yourself for logical markup or dened by macro packages
which aect the font in the typeset text. While L
a
T
E
Xs built-in macros and macros of
packages known by AUCT
E
X are already handled by font-latex, dierent keyword lists per
type style and macro type are provided for entering your own macros which are listed in
the table below.
Chapter 3: Controlling Screen Display 38
font-latex-match-bold-command-keywords
Keywords for commands specifying a bold type style.
Face: font-latex-bold-face
font-latex-match-italic-command-keywords
Keywords for commands specifying an italic font.
Face: font-latex-italic-face
font-latex-match-math-command-keywords
Keywords for commands specifying a math font.
Face: font-latex-math-face
font-latex-match-type-command-keywords
Keywords for commands specifying a typewriter font.
Face: font-lock-type-face
font-latex-match-bold-declaration-keywords
Keywords for declarations specifying a bold type style.
Face: font-latex-bold-face
font-latex-match-italic-declaration-keywords
Keywords for declarations specifying an italic font.
Face: font-latex-italic-face
font-latex-match-type-declaration-keywords
Keywords for declarations specifying a typewriter font.
Face: font-latex-type-face
Deactivating defaults of built-in keyword classes
font-latex ships with predened lists of keywords for the classes described above. You can
disable these defaults per class by customizing the variable font-latex-deactivated-
keyword-classes. This is a list of strings for keyword classes to be deactivated. Valid
entries are "warning", "variable", "reference", "function" , "sectioning-0", "sectioning-
1", "sectioning-2", "sectioning-3", "sectioning-4", "sectioning-5", "textual", "bold-
command", "italic-command", "math-command", "type-command", "bold-declaration",
"italic-declaration", "type-declaration".
You can also get rid of certain keywords only. For example if you want to remove
highlighting of footnotes as references you can put the following stanza into your init le:
(eval-after-load "font-latex"
(setq-default
font-latex-match-reference-keywords-local
(remove "footnote" font-latex-match-reference-keywords-local)))
But note that this means ddling with font-latexs internals and is not guaranteed to
work in future versions of font-latex.
User-dened keyword classes
In case the customization options explained above do not suce for your needs, you can
specify your own keyword classes by customizing the variable font-latex-user-keyword-
classes.
Chapter 3: Controlling Screen Display 39
[User Option] font-latex-user-keyword-classes
Every keyword class consists of four parts, a name, a list of keywords, a face and a
specier for the type of macros to be highlighted.
When adding new entries, you have to use unique values for the class names, i.e. they
must not clash with names of the built-in keyword classes or other names given by
you. Additionally the names must not contain spaces.
The list of keywords denes which commands and declarations should be covered by
the keyword class. A keyword can either be a simple command name omitting the
leading backslash or a list consisting of the command name and a string specifying
the sequence of arguments for the command.
The face argument can either be an existing face or font specications made by you.
(The latter option is not available on XEmacs.)
There are three alternatives for the type of keywordsCommand with arguments,
Declaration inside T
E
X group and Command without argumentswhich corre-
spond with the macro types explained above.
3.1.2 Fontication of quotes
Text in quotation marks is displayed with the face font-latex-string-face. Besides the
various forms of opening and closing double and single quotation marks, so-called guillemets
(<<, >>) can be used for quoting. Because there are two styles of using themFrench style:
<< text >>; German style: >>text<<you can customize the variable font-latex-quotes to
tell font-latex which type you are using if the correct value cannot be derived from document
properties.
[User Option] font-latex-quotes
The default value of font-latex-quotes is auto which means that font-latex will
try to derive the correct type of quotation mark matching from document properties
like the language option supplied to the babel L
a
T
E
X package.
If the automatic detection fails for you and you mostly use one specic style you can
set it to a specic language-dependent value as well. Set the value to german if you
are using >>German quotes<< and to french if you are using << French quotes >>.
font-latex will recognize the dierent ways these quotes can be given in your source
code, i.e. ("<, ">), (<<, >>) and the respective 8-bit variants.
If you set font-latex-quotes to nil, quoted content will not be fontied.
3.1.3 Fontication of mathematical constructs
In L
a
T
E
X mathematics can be indicated by a variety of dierent methods: toggles (like dollar
signs), macros and environments. Math constructs known by font-latex are displayed with
the face font-latex-math-face. Support for dollar signs and shorthands like \(...\)
or \[...\] is built-in and not customizable. Support for other math macros and envi-
ronments can be adapted by customizing the variables font-latex-match-math-command-
keywords and font-latex-math-environments respectively.
In order to make math constructs more readable, font-latex displays subscript and super-
script parts in a smaller font and raised or lowered respectively. This fontication feature can
be controlled with the variables font-latex-fontify-script and font-latex-script-
display.
Chapter 3: Controlling Screen Display 40
[User Option] font-latex-fontify-script
If non-nil, fontify subscript and superscript strings.
Note that this feature is not available on XEmacs, for which it is disabled per default.
In GNU Emacs raising and lowering is not enabled for versions 21.3 and before due
to it working not properly.
[User Option] font-latex-script-display
Display specication for subscript and superscript content. The car is used for sub-
script, the cdr is used for superscript. The feature is implemented using so-called
display properties. For information on what exactly to specify for the values, see
Section Other Display Specications in GNU Emacs Lisp Reference Manual.
3.1.4 Verbatim macros and environments
Usually it is not desirable to have content to be typeset verbatim highlighted according to
L
a
T
E
X syntax. Therefore this content will be fontied uniformly with the face font-latex-
verbatim-face.
font-latex dierentiates three dierent types of verbatim constructs for fontica-
tion. Macros with special characters like | as delimiters, macros with braces, and
environments. Which macros and environments are recognized is controlled by the
variables LaTeX-verbatim-macros-with-delims, LaTeX-verbatim-macros-with-braces,
and LaTeX-verbatim-environments respectively.
3.1.5 Faces used by font-latex
In case you want to change the colors and fonts used by font-latex please refer to the
faces mentioned in the explanations above and use M-x customize-face RET <face> RET.
All faces dened by font-latex are accessible through a customization group by typing M-x
customize-group RET font-latex-highlighting-faces RET.
3.1.6 Known fontication problems
In certain cases the fontication machinery fails to interpret buer contents correctly. This
can lead to color bleed, i.e. large parts of a buer get fontied with an inappropriate face.
A typical situation for this to happen is the use of a dollar sign ($) in a verbatim macro or
environment. If font-latex is not aware of the verbatim construct, it assumes the dollar sign
to be a toggle for mathematics and fonties the following buer content with the respective
face until it nds a closing dollar sign or till the end of the buer.
As a remedy you can make the verbatim construct known to font-latex, see Section 3.1.4
[Verbatim content], page 40. If this is not possible, you can insert a commented dollar sign
(%$) at the next suitable end of line as a quick workaround.
3.2 Folding Macros and Environments
A popular complaint about markup languages like T
E
X and L
a
T
E
X is that there is too much
clutter in the source text and that one cannot focus well on the content. There are macros
where you are only interested in the content they are enclosing, like font speciers where the
content might already be fontied in a special way by font locking. Or macros the content
of which you only want to see when actually editing it, like footnotes or citations. Similarly
Chapter 3: Controlling Screen Display 41
you might nd certain environments or comments distracting when trying to concentrate
on the body of your document.
With AUCT
E
Xs folding functionality you can collapse those items and replace them by
a xed string, the content of one of their arguments, or a mixture of both. If you want
to make the original text visible again in order to view or edit it, move point sideways
onto the placeholder (also called display string) or left-click with the mouse pointer on
it. (The latter is currently only supported on Emacs.) The macro or environment will
unfold automatically, stay open as long as point is inside of it and collapse again once you
move point out of it. (Note that folding of environments currently does not work in every
AUCT
E
X mode.)
In order to use this feature, you have to activate TeX-fold-mode which will activate the
auto-reveal feature and the necessary commands to hide and show macros and environments.
You can activate the mode in a certain buer by typing the command M-x TeX-fold-mode
RET or using the keyboard shortcut C-c C-o C-f. If you want to use it every time you edit
a L
a
T
E
X document, add it to a hook:
(add-hook LaTeX-mode-hook (lambda ()
(TeX-fold-mode 1)))
If it should be activated in all AUCT
E
X modes, use TeX-mode-hook instead of LaTeX-
mode-hook.
Once the mode is active there are several commands available to hide and show macros,
environments and comments:
[Command] TeX-fold-buffer
(C-c C-o C-b) Hide all foldable items in the current buer according to the setting
of TeX-fold-type-list.
If you want to have this done automatically every time you open a le, add it to a
hook and make sure the function is called after font locking is set up for the buer.
The following code should accomplish this:
(add-hook find-file-hook TeX-fold-buffer t)
The command can be used any time to refresh the whole buer and fold any new
macros and environments which were inserted after the last invocation of the com-
mand.
[User Option] TeX-fold-type-list
List of symbols determining the item classes to consider for folding. This can be
macros, environments and comments. Per default only macros and environments are
folded.
[User Option] TeX-fold-force-fontify
In order for all folded content to get the right faces, the whole buer has to be fontied
before folding is carried out. TeX-fold-buffer therefore will force fontication of
unfontied regions. As this will prolong the time folding takes, you can prevent
forced fontication by customizing the variable TeX-fold-force-fontify.
Chapter 3: Controlling Screen Display 42
[User Option] TeX-fold-preserve-comments
By default items found in comments will be folded. If your comments often contain
unnished code this might lead to problems. Give this variable a non-nil value and
foldable items in your comments will be left alone.
[Command] TeX-fold-region
(C-c C-o C-r) Hide all congured macros in the marked region.
[Command] TeX-fold-paragraph
(C-c C-o C-p) Hide all congured macros in the paragraph containing point.
[Command] TeX-fold-macro
(C-c C-o C-m) Hide the macro on which point currently is located. If the name of the
macro is found in TeX-fold-macro-spec-list, the respective display string will be
shown instead. If it is not found, the name of the macro in sqare brackets or the de-
fault string for unspecied macros (TeX-fold-unspec-macro-display-string) will
be shown, depending on the value of the variable TeX-fold-unspec-use-name.
[Command] TeX-fold-env
(C-c C-o C-e) Hide the environment on which point currently is located. The be-
havior regarding the display string is analogous to TeX-fold-macro and determined
by the variables TeX-fold-env-spec-list and TeX-fold-unspec-env-display-
string respectively.
[Command] TeX-fold-math
Hide the math macro on which point currently is located. If the name of the macro
is found in TeX-fold-math-spec-list, the respective display string will be shown
instead. If it is not found, the name of the macro in sqare brackets or the default string
for unspecied macros (TeX-fold-unspec-macro-display-string) will be shown,
depending on the value of the variable TeX-fold-unspec-use-name.
[Command] TeX-fold-comment
(C-c C-o C-c) Hide the comment point is located on.
[Command] TeX-fold-clearout-buffer
(C-c C-o b) Permanently unfold all macros and environments in the current buer.
[Command] TeX-fold-clearout-region
(C-c C-o r) Permanently unfold all macros and environments in the marked region.
[Command] TeX-fold-clearout-paragraph
(C-c C-o p) Permanently unfold all macros and environments in the paragraph con-
taining point.
[Command] TeX-fold-clearout-item
(C-c C-o i) Permanently show the macro or environment on which point currently is
located. In contrast to temporarily opening the macro when point is moved sideways
onto it, the macro will be permanently unfolded and will not collapse again once point
is leaving it.
Chapter 3: Controlling Screen Display 43
[Command] TeX-fold-dwim
(C-c C-o C-o) Hide or show items according to the current context. If there is folded
content, unfold it. If there is a marked region, fold all congured content in this
region. If there is no folded content but a macro or environment, fold it.
In case you want to use a dierent prex than C-c C-o for these commands you can
customize the variable TeX-fold-command-prefix. (Note that this will not change the key
binding for activating the mode.)
The commands above will only take macros or environments into consideration which
are specied in the variables TeX-fold-macro-spec-list or TeX-fold-env-spec-list
respectively.
[User Option] TeX-fold-macro-spec-list
List of replacement speciers and macros to fold. The specier can be a string, an
integer or a function symbol.
If you specify a string, it will be used as a display replacement for the whole macro.
Numbers in braces, brackets, parens or angle brackets will be replaced by the re-
spective macro argument. For example {1} will be replaced by the rst mandatory
argument of the macro. One can also dene alternatives within the specier which
are used if an argument is not found. Alternatives are separated by ||. They are
most useful with optional arguments. As an example, the default specier for \item
is [1]:||* which means that if there is an optional argument, its value is shown
followed by a colon. If there is no optional argument, only an asterisk is used as the
display string.
If you specify a number as the rst element, the content of the respective mandatory
argument of a L
a
T
E
X macro will be used as the placeholder.
If the rst element is a function symbol, the function will be called with all mandatory
arguments of the macro and the result of the function call will be used as a replacement
for the macro.
The placeholder is made by copying the text from the buer together with its prop-
erties, i.e. its face as well. If fontication has not happened when this is done
(e.g. because of lazy font locking) the intended fontication will not show up. As a
workaround you can leave Emacs idle a few seconds and wait for stealth font locking to
nish before you fold the buer. Or you just re-fold the buer with TeX-fold-buffer
when you notice a wrong fontication.
[User Option] TeX-fold-env-spec-list
List of display strings or argument numbers and environments to fold. Argu-
ment numbers refer to the \begin statement. That means if you have e.g.
\begin{tabularx}{\linewidth}{XXX} ... \end{tabularx} and specify 3 as the
argument number, the resulting display string will be XXX.
[User Option] TeX-fold-math-spec-list
List of display strings and math macros to fold.
The variables TeX-fold-macro-spec-list, TeX-fold-env-spec-list, and TeX-fold-
math-spec-list apply to any AUCT
E
X mode. If you want to make settings which are only
Chapter 3: Controlling Screen Display 44
applied to L
a
T
E
X mode, you can use the mode-specic variables LaTeX-fold-macro-spec-
list, LaTeX-fold-env-spec-list, and LaTeX-fold-math-spec-list
[User Option] TeX-fold-unspec-macro-display-string
Default display string for macros which are not specied in TeX-fold-macro-spec-
list.
[User Option] TeX-fold-unspec-env-display-string
Default display string for environments which are not specied in TeX-fold-env-
spec-list.
[User Option] TeX-fold-unspec-use-name
If non-nil the name of the macro or environment surrounded by square brackets is
used as display string, otherwise the defaults specied in TeX-fold-unspec-macro-
display-string or TeX-fold-unspec-env-display-string respectively.
When you hover with the mouse pointer over folded content, its original text will be
shown in a tooltip or the echo area depending on Tooltip mode being activate. In order
to avoid exorbitantly big tooltips and to cater for the limited space in the echo area the
content will be cropped after a certain amount of characters dened by the variable TeX-
fold-help-echo-max-length.
[User Option] TeX-fold-help-echo-max-length
Maximum length of original text displayed in a tooltip or the echo area for folded
content. Set it to zero in order to disable this feature.
3.3 Outlining the Document
AUCT
E
X supports the standard outline minor mode using L
a
T
E
X/ConT
E
Xt sectioning com-
mands as header lines. See Section Outline Mode in GNU Emacs Manual.
You can add your own headings by setting the variable TeX-outline-extra.
[Variable] TeX-outline-extra
List of extra T
E
X outline levels.
Each element is a list with two entries. The rst entry is the regular expression
matching a header, and the second is the level of the header. A ^ is automatically
prepended to the regular expressions in the list, so they must match text at the
beginning of the line.
See LaTeX-section-list or ConTeXt-INTERFACE-section-list for existing header
levels.
The following example add \item and \bibliography headers, with \bibliography
at the same outline level as \section, and \item being below \subparagraph.
(setq TeX-outline-extra
(("[ \t]*\\\\\\(bib\\)?item\\b" 7)
("\\\\bibliography\\b" 2)))
You may want to check out the unbundled out-xtra package for even better outline
support. It is available from your favorite emacs lisp archive.
Chapter 4: Starting Processors, Viewers and Other Programs 45
4 Starting Processors, Viewers and Other
Programs
The most powerful features of AUCT
E
X may be those allowing you to run T
E
X, L
a
T
E
X,
ConT
E
Xt and other external commands like BibT
E
X and makeindex from within Emacs,
viewing and printing the results, and moreover allowing you to debug your documents.
AUCT
E
X comes with a special tool bar for T
E
X and L
a
T
E
X which provides buttons for
the most important commands. You can enable or disable it by customizing the options
plain-TeX-enable-toolbar and LaTeX-enable-toolbar in the TeX-tool-bar customiza-
tion group.
4.1 Executing Commands
Formatting the document with T
E
X, L
a
T
E
X or ConT
E
Xt, viewing with a previewer, printing
the document, running BibT
E
X, making an index, or checking the document with lacheck
or chktex all require running an external command.
4.1.1 Starting a Command on a Document or Region
There are two ways to run an external command, you can either run it on the current
document with TeX-command-master, or on the current region with TeX-command-region.
A special case of running T
E
X on a region is TeX-command-buffer which diers from TeX-
command-master if the current buer is not its own master le.
[Command] TeX-command-master
(C-c C-c) Query the user for a command, and run it on the master le associated
with the current buer. The name of the master le is controlled by the variable TeX-
master. The available commands are controlled by the variable TeX-command-list.
[Command] TeX-command-region
(C-c C-r) Query the user for a command, and run it on the contents of the selected
region. The region contents are written into the region le, after extracting the header
and trailer from the master le. If mark is inactive (which can happen with Transient
Mark mode), use the old region. See also the command TeX-pin-region about how
to x a region.
The name of the region le is controlled by the variable TeX-region. The name of the
master le 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.
[Command] TeX-command-buffer
(C-c C-b) Query the user for a command, and apply it to the contents of the current
buer. The buer contents are written into the region le, after extracting the header
and trailer from the master le. The command is then actually run on the region le.
See above for details.
[User Option] TeX-region
The name of the le for temporarily storing the text when formatting the current
region.
Chapter 4: Starting Processors, Viewers and Other Programs 46
[User Option] TeX-header-end
A regular expression matching the end of the header. By default, this is
\begin{document} in L
a
T
E
X mode and %**end of header in T
E
X mode.
[User Option] TeX-trailer-start
A regular expression matching the start of the trailer. By default, this is
\end{document} in L
a
T
E
X mode and \bye in T
E
X mode.
If you want to change the values of TeX-header-end and TeX-trailer-start you can
do this for all les by setting the variables in a mode hook or per le by specifying them as
le variables (see Section File Variables in The Emacs Editor).
[Command] TeX-pin-region
(C-c C-t C-r) If you dont have a mode like Transient Mark mode active, where
marks get disabled automatically, the region would need to get properly set before
each call to TeX-command-region. If you x the current region with C-c C-t C-r,
then it will get used for more commands even though mark and point may change.
An explicitly activated mark, however, will always dene a new region when calling
TeX-command-region.
AUCT
E
X will allow one process for each document, plus one process for the region le
to be active at the same time. Thus, if you are editing n dierent 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 4.3 [Debugging], page 51 and Section 4.5 [Con-
trol], page 52 will work on that process, otherwise they will work on the process associated
with the current document.
4.1.2 Selecting and Executing a Command
Once you started the command selection with C-c C-c, C-c C-s or C-c C-b you will be
prompted for the type of command. AUCT
E
X will try to guess which command is appro-
priate in the given situation and propose it as default. Usually this is a processor like TeX
or LaTeX if the document was changed or a viewer if the document was just typeset. Other
commands can be selected in the minibuer with completion support by typing TAB.
The available commands are dened by the variable TeX-command-list. Per default it
includes commands for typesetting the document (e.g. LaTeX), for viewing the output
(View), for printing (Print), for generating an index (Index) or for spell checking
(Spell) to name but a few. You can also add your own commands by adding entries
to TeX-command-list. Refer to its doc string for information about its syntax. You might
also want to look at TeX-expand-list to learn about the expanders you can use in TeX-
command-list.
Note that the default of the variable occasionally changes. Therefore it is advisable to
add to the list rather than overwriting it. You can do this with a call to add-to-list in
your init le. For example, if you wanted to add a command for running a program called
foo on the master or region le, you could do this with the following form.
(eval-after-load "tex"
(add-to-list TeX-command-list
("Foo" "foo %s" TeX-run-command t t :help "Run foo") t))
Chapter 4: Starting Processors, Viewers and Other Programs 47
As mentioned before, AUCT
E
X will try to guess what command you want to invoke.
If you want to use another command than TeX, LaTeX or whatever processor AUCT
E
X
thinks is appropriate for the current mode, set the variable TeX-command-default. You
can do this for all les by setting it in a mode hook or per le by specifying it as a le
variable (see Section File Variables in The Emacs Editor).
[User Option] TeX-command-default
The default command to run in this buer. Must be an entry in TeX-command-list.
In case you use biblatex in a document, AUCT
E
X switches from BibT
E
X to Biber for
bibliography processing. In case you want to keep using BibT
E
X, set the variable LaTeX-
biblatex-use-Biber to nil.
After conrming a command to execute, AUCT
E
X will try to save any buers related
to the document, and check if the document needs to be reformatted. If the variable TeX-
save-query is non-nil, AUCT
E
X will query before saving each le. By default AUCT
E
X
will check emacs buers associated with les 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.
[User Option] TeX-check-path
Directory path to search for dependencies.
If nil, just check the current le. Used when checking if any les have changed.
4.1.3 Options for T
E
X Processors
There are some options you can customize aecting which processors are invoked or the
way this is done and which output they produce as a result. These options control if DVI or
PDF output should be produced, if T
E
X should be started in interactive or nonstop mode, if
source specials or a SyncT
E
X le should be produced for making inverse and forward search
possible or which T
E
X engine should be used instead of regular T
E
X, like PDFT
E
X, Omega
or XeT
E
X.
[Command] TeX-PDF-mode
(C-c C-t C-p) This command toggles the PDF mode of AUCT
E
X, a buer-local minor
mode. You can customize TeX-PDF-mode to give it a dierent default. The default
is used when AUCT
E
X does not have additional clue about what a document might
want. This option usually results in calling either PDFT
E
X or ordinary T
E
X.
[User Option] TeX-DVI-via-PDFTeX
If this is set, DVI will also be produced by calling PDFT
E
X, setting \pdfoutput=0.
This makes it possible to use PDFT
E
X features like character protrusion even when
producing DVI les. Contemporary T
E
X distributions do this anyway, so that you
need not enable the option within AUCT
E
X.
[Command] TeX-interactive-mode
(C-c C-t C-i) This command toggles the interactive mode of AUCT
E
X, a global minor
mode. You can customize TeX-interactive-mode to give it a dierent default. In
interactive mode, T
E
X will pause with an error prompt when errors are encountered
and wait for the user to type something.
Chapter 4: Starting Processors, Viewers and Other Programs 48
[Command] TeX-source-correlate-mode
(C-c C-t C-s) Toggles support for forward and inverse search. Forward search refers
to jumping to the place in the previewed document corresponding to where point
is located in the document source and inverse search to the other way round. See
Section 4.2.2 [I/O Correlation], page 51.
You can permanently activate TeX-source-correlate-mode by customizing the vari-
able TeX-source-correlate-mode. There is a bunch of customization options for the
mode, use M-x customize-group RET TeX-view RET to nd out more.
AUCT
E
X is aware of three dierent means to do I/O correlation: source specials
(only DVI output), the pdfsync L
a
T
E
X package (only PDF output) and SyncT
E
X.
The choice between source specials and SyncT
E
X can be controlled with the variable
TeX-source-correlate-method.
Should you use source specials it has to be stressed very strongly however, that source
specials can cause dierences in page breaks and spacing, can seriously interfere with
various packages and should thus never be used for the nal version of a document. In
particular, ne-tuning the page breaks should be done with source specials switched
o.
AUCT
E
X also allows you to easily select dierent T
E
X engines for processing, either by
using the entries in the TeXing Options submenu below the Command menu or by calling
the function TeX-engine-set. These eventually set the variable TeX-engine which you can
also modify directly.
[User Option] TeX-engine
This variable allows you to choose which T
E
X engine should be used for typesetting
the document, i.e. the executables which will be used when you invoke the TeX or
LaTeX commands. The value should be one of the symbols dened in TeX-engine-
alist-builtin or TeX-engine-alist. The symbols default, xetex, luatex
and omega are available from the built-in list.
Note that TeX-engine is buer-local, so setting the variable directly or via the above
mentioned menu or function will not take eect in other buers. If you want to activate
an engine for all AUCT
E
X modes, set TeX-engine in your init le, e.g. by using M-x
customize-variable <RET>. If you want to activate it for a certain AUCT
E
X mode only,
set the variable in the respective mode hook. If you want to activate it for certain les, set
it through le variables (see Section File Variables in The Emacs Editor).
Should you need to change the executable names related to the dierent engine settings,
there are some variables you can tweak. Those are TeX-command, LaTeX-command, TeX-
Omega-command, LaTeX-Omega-command, ConTeXt-engine and ConTeXt-Omega-engine.
The rest of the executables is dened directly in TeX-engine-alist-builtin. If you want
to override an entry from that, add an entry to TeX-engine-alist that starts with the
same symbol as that the entry in the built-in list and specify the executables you want to
use instead. You can also add entries to TeX-engine-alist in order to add support for
engines not covered per default.
[User Option] TeX-engine-alist
Alist of TeX engines and associated commands. Each entry is a list with a maximum
of ve elements. The rst element is a symbol used to identify the engine. The second
Chapter 4: Starting Processors, Viewers and Other Programs 49
is a string describing the engine. The third is the command to be used for plain TeX.
The fourth is the command to be used for LaTeX. The fth is the command to be used
for the --engine parameter of ConTeXts texexec program. Each command can
either be a variable or a string. An empty string or nil means there is no command
available.
You can customize AUCT
E
X to show the processor output as it is produced.
[User Option] TeX-show-compilation
If non-nil, the output of T
E
X compilation is shown in another window.
4.2 Viewing the Formatted Output
AUCT
E
X allows you to start external programs for previewing the formatted output of your
document.
4.2.1 Starting Viewers
Viewers are normally invoked by pressing C-c C-c once the document is formatted, which
will propose the View command, or by activating the respective entry in the Command
menu. Alternatively you can type C-c C-v which calls the function TeX-view.
[Command] TeX-view
(C-c C-v) Start a viewer without conrmation. The viewer is started either on a
region or the master le, depending on the last command issued. This is especially
useful for jumping to the location corresponding to point in the viewer when using
TeX-source-correlate-mode.
AUCT
E
X will try to guess which type of viewer (DVI, PostScript or PDF) has to be used
and what options are to be passed over to it. This decision is based on the output les
present in the working directory as well as the class and style options used in the document.
For example, if there is a DVI le in your working directory, a DVI viewer will be invoked.
In case of a PDF le it will be a PDF viewer. If you specied a special paper format like
a5paper or use the landscape option, this will be passed to the viewer by the appropriate
options. Especially some DVI viewers depend on this kind of information in order to display
your document correctly. In case you are using pstricks or psfrag in your document,
a DVI viewer cannot display the contents correctly and a PostScript viewer will be invoked
instead.
The association between the tests for the conditions mentioned above and the viewers is
made in the variable TeX-view-program-selection. Therefore this variable is the starting
point for customization if you want to use other viewers than the ones suggested by default.
[User Option] TeX-view-program-selection
This is a list of predicates and viewers which is evaluated from front to back in order to
nd out which viewer to call under the given conditions. In the rst element of each list
item you can reference one or more predicates dened in TeX-view-predicate-list
or TeX-view-predicate-list-builtin. In the second element you can reference
a viewer dened in TeX-view-program-list or TeX-view-program-list-builtin.
The viewer of the rst item with a positively evaluated predicate is selected.
Chapter 4: Starting Processors, Viewers and Other Programs 50
So TeX-view-program-selection only contains references to the actual implemen-
tations of predicates and viewer commands respectively which can be found elsewhere.
AUCT
E
X comes with a set of precongured predicates and viewer commands which are
stored in the variables TeX-view-predicate-list-builtin and TeX-view-program-list-
builtin respectively. If you are not satised with those and want to overwrite one of them
or add your own denitions, you can do so via the variables TeX-view-predicate-list
and TeX-view-program-list.
[User Option] TeX-view-predicate-list
This is a list of predicates for viewer selection and invocation. The rst element of
each list item is a symbol and the second element a Lisp form to be evaluated. The
form should return nil if the predicate is not fullled.
A built-in predicate from TeX-view-predicate-list-builtin can be overwritten by
dening a new predicate with the same symbol.
[User Option] TeX-view-program-list
This is a list of viewer specications each consisting of a symbolic name and either a
command line or a function to be invoked when the viewer is called. If a command
line is used, parts of it can be conditionalized by prexing them with predicates from
TeX-view-predicate-list or TeX-view-predicate-list-builtin. (See the doc
string for the exact format to use.) The command line can also contain placeholders
as dened in TeX-expand-list which are expanded before the viewer is called.
A built-in viewer spec from TeX-view-program-list-builtin can be overwritten by
dening a new viewer spec with the same name.
Note that the viewer selection and invocation as described above will only work if certain
default settings in AUCT
E
X are intact. For one, the whole viewer selection machinery will
only be triggered if the %V expander in TeX-expand-list is unchanged. So if you have
trouble with the viewer invocation you might check if there is an older customization of the
variable in place. In addition, the use of a function in TeX-view-program-list only works
if the View command in TeX-command-list makes use of the hook TeX-run-discard-or-
function.
Note also that the implementation described above replaces an older one which was less
exible. This old implementation works with the variables TeX-output-view-style and
TeX-view-style which are used to associate le types and style options with viewers. If
desired you can reactivate it by using the placeholder %vv for the View command in TeX-
command-list. Note however, that it is bound to be removed from AUCT
E
X once the new
implementation proved to be satisfactory. For the time being, nd a short description of
the mentioned customization options below.
[User Option] TeX-output-view-style
List of output le extensions, style options and view options. Each item of the list
consists of three elements. If the rst element (a regular expression) matches the
output le extension, and the second element (a regular expression) matches the
name of one of the style options, any occurrence of the string %V in a command in
TeX-command-list will be replaced with the third element.
Chapter 4: Starting Processors, Viewers and Other Programs 51
[User Option] TeX-view-style
List of style options and view options. This is the predecessor of TeX-output-view-
style which does not provide the possibility to specify output le extensions. It is
used as a fallback in case none of the alternatives specied in TeX-output-view-style
match. In case none of the entries in TeX-view-style match either, no suggestion
for a viewer is made.
4.2.2 Forward and Inverse Search
Forward and inverse search refer to the correlation between the document source in the
editor and the typeset document in the viewer. Forward search allows you to jump to the
place in the previewed document corresponding to a certain line in the document source
and inverse search vice versa.
AUCT
E
X supports three methods for forward and inverse search: source specials (only
DVI output), the pdfsync L
a
T
E
X package (only PDF output) and SyncT
E
X (any type of
output). If you want to make use of forward and inverse searching with source specials or
SyncT
E
X, switch on TeX-source-correlate-mode. See Section 4.1.3 [Processor Options],
page 47, on how to do that. The use of the pdfsync package is detected automatically if
document parsing is enabled.
Forward search happens automatically upon calling the viewer, e.g. by typing C-c C-v
(TeX-view). This will open the viewer or bring it to front and display the output page
corresponding to the position of point in the source le. AUCT
E
X will automatically pass
the necessary command line options to the viewer for this to happen.
Upon opening the viewer you will be asked if you want to start a server process (Gnuserv
or Emacs server) which is necessary for inverse search. This happens only if there is no server
running already. You can customize the variable TeX-source-correlate-start-server
to inhibit the question and always or never start the server respectively.
[User Option] TeX-source-correlate-start-server
If TeX-source-correlate-mode is active and a viewer is invoked, the default behavior
is to ask if a server process should be started. Set this variable to t if the question
should be inhibited and the server should always be started. Set it to nil if the server
should never be started. Inverse search will not be available in the latter case.
Inverse search, i.e. jumping to the part of your document source in Emacs corresponding
to a certain position in the viewer, is triggered from the viewer, typically by a mouse click.
Refer to the documentation of your viewer to nd out how it has to be congured and what
you have to do exactly. In xdvi you normally have to use C-down-mouse-1.
4.3 Catching the errors
Once youve formatted your document you may debug it, i.e. browse through the errors
(La)T
E
X reported.
[Command] TeX-next-error
(C-c ) Go to the next error reported by T
E
X. 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.
Chapter 4: Starting Processors, Viewers and Other Programs 52
Normally AUCT
E
X 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 AUCT
E
X 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 AUCT
E
X should stop at warnings as well as normal
errors.
As default, AUCT
E
X will display a special help buer containing the error reported by
T
E
X along with the documentation. There is however an expert option, which allows you
to display the real T
E
X output.
[User Option] TeX-display-help
If t AUCT
E
X 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 AUCT
E
X will display the output buer with the raw T
E
X
output.
4.4 Checking for problems
Running T
E
X or L
a
T
E
X will only nd regular errors in the document, not examples of bad
style. Furthermore, description of the errors may often be confusing. The utility lacheck
can be used to nd style errors, such as forgetting to escape the space after an abbreviation
or using ... instead of \ldots and many other problems like that. You start lacheck
with C-c C-c Check RET. The result will be a list of errors in the *compilation* buer.
You can go through the errors with C-x (next-error, see Section Compilation in The
Emacs Editor), which will move point to the location of the next error.
Another newer program which can be used to nd errors is chktex. It is much more con-
gurable than lacheck, but doesnt nd all the problems lacheck does, at least in its default
conguration. You must install the programs before using them, and for chktex you may
also need modify TeX-command-list unless you use its lacheck compatibility wrapper. You
can get lacheck from <URL:ftp://ftp.ctan.org/tex-archive/support/lacheck/> or
alternatively chktex from <URL:ftp://ftp.ctan.org/tex-archive/support/chktex/>.
4.5 Controlling the output
A number of commands are available for controlling the output of an application running
under AUCT
E
X
[Command] TeX-kill-job
(C-c C-k) Kill currently running external application. This may be either of T
E
X,
L
a
T
E
X, previewer, BibT
E
X, etc.
[Command] TeX-recenter-output-buffer
(C-c C-l) Recenter the output buer so that the bottom line is visible.
Chapter 4: Starting Processors, Viewers and Other Programs 53
[Command] TeX-home-buffer
(C-c ^) Go to the master le in the document associated with the current buer, or
if already there, to the le where the current process was started.
4.6 Cleaning intermediate and output les
[Command] TeX-clean
Remove generated intermediate les. In case a prex argument is given, remove
output les as well.
Canonical access to the function is provided by the Clean and Clean All entries
in TeX-command-list, invokable with C-c C-c or the Command menu.
The patterns governing which les to remove can be adapted separately for each
AUCT
E
X mode
by means of the variables plain-TeX-clean-intermediate-suffixes, plain-TeX-
clean-output-suffixes, LaTeX-clean-intermediate-suffixes,
LaTeX-clean-output-suffixes, docTeX-clean-intermediate-suffixes, docTeX-
clean-output-suffixes, Texinfo-clean-intermediate-suffixes, Texinfo-
clean-output-suffixes, ConTeXt-clean-intermediate-suffixes and ConTeXt-
clean-output-suffixes.
[User Option] TeX-clean-confirm
Control if deletion of intermediate and output les has to be conrmed before it is
actually done. If non-nil, ask before deleting les.
4.7 Documentation about macros and packages
[Command] TeX-doc
(C-c ?) Get documentation about macros, packages or T
E
X & Co. in general. The
function will prompt for the name of a command or manual, providing a list of
available keywords for completion. If point is on a command or word with available
documentation, this will be suggested as default.
In case no documentation could be found, a prompt for querying the texdoc program
is shown, should the latter be available.
The command can be invoked by the key binding mentioned above as well as the
Find Documentation... entry in the mode menu.
Chapter 5: Customization and Extension 54
5 Customization and Extension
5.1 Modes and Hooks
AUCT
E
X supports a wide variety of derivatives and extensions of T
E
X. Besides plain T
E
X
those are L
a
T
E
X, AMS-T
E
X, ConT
E
Xt, Texinfo and docT
E
X. For each of them there is a
separate major mode in AUCT
E
X and each major mode runs text-mode-hook, TeX-mode-
hook as well as a hook special to the mode in this order. The following table provides an
overview of the respective mode functions and hooks.
Type Mode function Hook
Plain T
E
X plain-TeX-mode plain-TeX-mode-hook
L
a
T
E
X LaTeX-mode LaTeX-mode-hook
AMS-T
E
X ams-tex-mode AmS-TeX-mode-hook
ConT
E
Xt ConTeXt-mode ConTeXt-mode-hook
Texinfo Texinfo-mode Texinfo-mode-hook
DocT
E
X docTeX-mode docTeX-mode-hook
If you need to make a customization via a hook which is only relevant for one of the
modes listed above, put it into the respective mode hook, if it is relevant for any AUCT
E
X
mode, add it to TeX-mode-hook and if it is relevant for all text modes, append it to text-
mode-hook.
5.2 Multile Documents
You may wish to spread a document over many les (as you are likely to do if there are
multiple authors, or if you have not yet discovered the power of the outline commands
(see Section 3.3 [Outline], page 44)). This can be done by having a master le in which
you include the various les with the T
E
X macro \input or the L
a
T
E
X macro \include.
These les may also include other les themselves. However, to format the document you
must run the commands on the top level master le.
When you, for example, ask AUCT
E
X to run a command on the master le, it has no
way of knowing the name of the master le. By default, it will assume that the current le
is the master le. If you insert the following in your .emacs le AUCT
E
X will use a more
advanced algorithm.
(setq-default TeX-master nil) ; Query for master file.
If AUCT
E
X nds the line indicating the end of the header in a master le (TeX-header-
end), it can gure out for itself that this is a master le. Otherwise, it will ask for the
name of the master le associated with the buer. To avoid asking you again, AUCT
E
X
will automatically insert the name of the master le as a le variable (see Section File
Variables in The Emacs Editor). You can also insert the le variable yourself, by putting
the following text at the end of your les.
%%% Local Variables:
%%% TeX-master: "master"
%%% End:
Chapter 5: Customization and Extension 55
You should always set this variable to the name of the top level document. If you always
use the same name for your top level documents, you can set TeX-master in your .emacs
le.
(setq-default TeX-master "master") ; All master files called "master".
[User Option] TeX-master
The master le associated with the current buer. If the le being edited is actually
included from another le, then you can tell AUCT
E
X the name of the master le by
setting this variable. If there are multiple levels of nesting, specify the top level le.
If this variable is nil, AUCT
E
X will query you for the name.
If the variable is t, then AUCT
E
X will assume the le is a master le itself.
If the variable is shared, then AUCT
E
X will query for the name, but will not change
the le.
[User Option] TeX-one-master
Regular expression matching ordinary T
E
X les.
You should set this variable to match the name of all les, for which it is a good idea
to append a TeX-master le variable entry automatically. When AUCT
E
X adds the
name of the master le as a le variable, it does not need to ask next time you edit
the le.
If you dislike AUCT
E
X automatically modifying your les, you can set this variable
to "<none>". By default, AUCT
E
X will modify any le with an extension of .tex.
[Command] TeX-master-file-ask
(C-c _) Query for the name of a master le and add the respective File Variables
(see Section File Variables in The Emacs Editor) to the le for setting this variable
permanently.
AUCT
E
X will not ask for a master le when it encounters existing les. This function
shall give you the possibility to insert the variable manually.
AUCT
E
X keeps track of macros, environments, labels, and style les that are used in
a given document. For this to work with multile documents, AUCT
E
X has to have a
place to put the information about the les in the document. This is done by having an
auto subdirectory placed in the directory where your document is located. Each time
you save a le, AUCT
E
X will write information about the le into the auto directory.
When you load a le, AUCT
E
X will read the information in the auto directory about the
le you loaded and the master le specied by TeX-master. Since the master le (perhaps
indirectly) includes all other les in the document, AUCT
E
X will get information from all
les in the document. This means that you will get from each le, for example, completion
for all labels dened anywhere in the document.
AUCT
E
X will create the auto directory automatically if TeX-auto-save is non-nil.
Without it, the les in the document will not know anything about each other, except for
the name of the master le. See Section 5.5.3 [Automatic Local], page 63.
[Command] TeX-save-document
(C-c C-d) Save all buers known to belong to the current document.
Chapter 5: Customization and Extension 56
[User Option] TeX-save-query
If non-nil, then query the user before saving each le with TeX-save-document.
5.3 Automatic Parsing of T
E
X Files
AUCT
E
X depends heavily on being able to extract information from the buers by parsing
them. Since parsing the buer can be somewhat slow, the parsing is initially disabled. You
are encouraged to enable them by adding the following lines to your .emacs le.
(setq TeX-parse-self t) ; Enable parse on load.
(setq TeX-auto-save t) ; Enable parse on save.
The latter command will make AUCT
E
X store the parsed information in an auto sub-
directory in the directory each time the T
E
X les are stored, see Section 5.5.3 [Automatic
Local], page 63. If AUCT
E
X nds the pre-parsed information when loading a le, it will
not need to reparse the buer. The information in the auto directory is also useful for
multile documents, see Section 5.2 [Multile], page 54, since it allows each le to access the
parsed information from all the other les in the document. This is done by rst reading
the information from the master le, and then recursively the information from each le
stored in the master le.
The variables can also be done on a per le basis, by changing the le local variables.
%%% Local Variables:
%%% TeX-parse-self: t
%%% TeX-auto-save: t
%%% End:
Even when you have disabled the automatic parsing, you can force the generation of
style information by pressing C-c C-n. This is often the best choice, as you will be able to
decide when it is necessary to reparse the le.
[User Option] TeX-parse-self
Parse le after loading it if no style hook is found for it.
[User Option] TeX-auto-save
Automatically save style information when saving the buer.
[Command] TeX-normal-mode arg
(C-c C-n) Remove all information about this buer, and apply the style hooks again.
Save buer rst including style information. With optional argument, also reload the
style hooks.
When AUCT
E
X saves your buer, it can optionally convert all tabs in your buer into
spaces. Tabs confuse AUCT
E
Xs error message parsing and so should generally be avoided.
However, tabs are signicant in some environments, and so by default AUCT
E
X does not
remove them. To convert tabs to spaces when saving a buer, insert the following in your
.emacs le:
(setq TeX-auto-untabify t)
[User Option] TeX-auto-untabify
Automatically remove all tabs from a le before saving it.
Chapter 5: Customization and Extension 57
Instead of disabling the parsing entirely, you can also speed it signicantly up by limiting
the information it will search for (and store) when parsing the buer. You can do this by
setting the default values for the buer local variables TeX-auto-regexp-list and TeX-
auto-parse-length in your .emacs le.
;; Only parse LaTeX class and package information.
(setq-default TeX-auto-regexp-list LaTeX-auto-minimal-regexp-list)
;; The class and package information is usually near the beginning.
(setq-default TeX-auto-parse-length 2000)
This example will speed the parsing up signicantly, but AUCT
E
X will no longer be
able to provide completion for labels, macros, environments, or bibitems specied in the
document, nor will it know what les belong to the document.
These variables can also be specied on a per le basis, by changing the le local variables.
%%% Local Variables:
%%% TeX-auto-regexp-list: TeX-auto-full-regexp-list
%%% TeX-auto-parse-length: 999999
%%% End:
[User Option] TeX-auto-regexp-list
List of regular expressions used for parsing the current le.
[User Option] TeX-auto-parse-length
Maximal length of T
E
X le that will be parsed.
The pre-specied lists of regexps are dened below. You can use these before loading
AUCT
E
X by quoting them, as in the example above.
[Constant] TeX-auto-empty-regexp-list
Parse nothing
[Constant] LaTeX-auto-minimal-regexp-list
Only parse L
a
T
E
X class and packages.
[Constant] LaTeX-auto-label-regexp-list
Only parse L
a
T
E
X labels.
[Constant] LaTeX-auto-regexp-list
Parse common L
a
T
E
X commands.
[Constant] plain-TeX-auto-regexp-list
Parse common plain T
E
X commands.
[Constant] TeX-auto-full-regexp-list
Parse all T
E
X and L
a
T
E
X commands that AUCT
E
X can use.
Chapter 5: Customization and Extension 58
5.4 Language Support
T
E
X and Emacs are usable for European (Latin, Cyrillic, Greek) based languages. Some
L
a
T
E
X and EmacsLisp packages are available for easy typesetting and editing documents in
European languages.
For CJK (Chinese, Japanese, and Korean) languages, Emacs or XEmacs with MULE
(MULtilingual Enhancement to GNU Emacs) support is required. MULE is part of Emacs
by default since Emacs 20. XEmacs has to be congured with the --with-mule option.
Special versions of T
E
X are needed for CJK languages: CT
E
X and ChinaT
E
X for Chinese,
ASCII pT
E
X and NTT jT
E
X for Japanese, HL
a
T
E
X and kT
E
X for Korean. The CJK-L
a
T
E
X
package is required for supporting multiple CJK scripts within a single document.
Note that Unicode is not fully supported in Emacs 21 and XEmacs 21. CJK characters
are not usable. Please use the MULE-UCS EmacsLisp package or Emacs 22 (not released
yet) if you need CJK.
5.4.1 Using AUCT
E
X with European Languages
5.4.1.1 Typing and Displaying Non-ASCII Characters
First you will need a way to write non-ASCII characters. You can either use macros, or
teach T
E
X about the ISO character sets. I prefer the latter, it has the advantage that the
usual standard emacs word movement and case change commands will work.
With L
a
T
E
X2e, just add \usepackage[latin1]{inputenc}. Other languages than
Western European ones will probably have other encoding needs.
To be able to display non-ASCII characters you will need an appropriate font and a
version of GNU Emacs capable of displaying 8-bit characters (e.g. Emacs 21). The manner
in which this is supported diers between Emacsen, so you need to take a look at your
respective documentation.
A compromise is to use an European character set when editing the le, and convert to
T
E
X macros when reading and writing the les.
iso-cvt.el
Much like iso-tex.el but is bundled with Emacs 19.23 and later.
x-compose.el
Similar package bundled with new versions of XEmacs.
X-Symbol
a much more complete package for both Emacs and XEmacs that can also
handle a lot of mathematical characters and input methods.
5.4.1.2 Style Files for Dierent Languages
AUCT
E
X supports style les for several languages. Each style le may modify AUCT
E
X
to better support the language, and will run a language specic hook that will allow
you to for example change ispell dictionary, or run code to change the keyboard remap-
ping. The following will for example choose a Danish dictionary for documents including
\usepackage[danish]{babel}. This requires parsing to be enabled, see Section 5.3 [Pars-
ing Files], page 56.
Chapter 5: Customization and Extension 59
(add-hook TeX-language-dk-hook
(lambda () (ispell-change-dictionary "danish")))
The following style les are recognized:
bulgarian
Runs style hook TeX-language-bg-hook. Gives " word syntax, makes the "
key insert a literal ". Typing " twice will insert insert " or " depending
on context. Typing - twice will insert "=, three times --.
czech Runs style hook TeX-language-cz-hook. Pressing " will insert \uv{ and }
depending on context.
danish Runs style hook TeX-language-dk-hook. Pressing " will insert " and "
depending on context. Typing - twice will insert "=, i.e. a hyphen string
allowing hyphenation in the composing words.
dutch Runs style hook TeX-language-nl-hook.
german
ngerman Runs style hook TeX-language-de-hook. Gives " word syntax, makes the "
key insert a literal ". Pressing the key twice will give you opening or closing
German quotes (" or "). Typing - twice will insert "=, three times --.
frenchb
francais
Runs style hook TeX-language-fr-hook. Pressing " will insert \\og and
\\fg depending on context. Note that the language name for customizing
TeX-quote-language-alist is french.
icelandic
Runs style hook TeX-language-is-hook. Gives " word syntax, makes the "
key insert a literal ". Typing " twice will insert insert " or " depending
on context. Typing - twice will insert "=, three times --.
italian Runs style hook TeX-language-it-hook. Pressing " will insert "< and ">
depending on context.
polish Runs style hook TeX-language-pl-hook. Gives " word syntax and makes the
" key insert a literal ". Pressing " twice will insert " or " depending on
context.
polski Runs style hook TeX-language-pl-hook. Makes the " key insert a literal ".
Pressing " twice will insert ,, or depending on context.
slovak Runs style hook TeX-language-sk-hook. Pressing " will insert \uv{ and }
depending on context.
swedish Runs style hook TeX-language-sv-hook. Pressing " will insert . Typing -
twice will insert "=, three times --.
Replacement of language-specic hyphen strings like "= with dashes does not require
to type - three times in a row. You can put point after the hypen string anytime and trigger
the replacement by typing -.
Chapter 5: Customization and Extension 60
In case you are not satised with the suggested behavior of quote and hyphen insertion
you can change it by customizing the variables TeX-quote-language-alist and LaTeX-
babel-hyphen-language-alist respectively.
[User Option] TeX-quote-language-alist
Used for overriding the default language-specic quote insertion behavior. This is an
alist where each element is a list consisting of four items. The rst item is the name
of the language in concern as a string. See the list of supported languages above. The
second item is the opening quotation mark. The third item is the closing quotation
mark. Opening and closing quotation marks can be specied directly as strings or as
functions returning a string. The fourth item is a boolean controlling quote insertion.
It should be non-nil if if the special quotes should only be used after inserting a literal
" character rst, i.e. on second key press.
[User Option] LaTeX-babel-hyphen-language-alist
Used for overriding the behavior of hyphen insertion for specic languages. Every
element in this alist is a list of three items. The rst item should specify the aected
language as a string. The second item denotes the hyphen string to be used as a
string. The third item, a boolean, controls the behavior of hyphen insertion and
should be non-nil if the special hyphen should be inserted after inserting a literal -
character, i.e. on second key press.
The defaults of hyphen insertion are dened by the variables LaTeX-babel-hyphen and
LaTeX-babel-hyphen-after-hyphen respectively.
[User Option] LaTeX-babel-hyphen
String to be used when typing -. This usually is a hyphen alternative or hyphenation
aid provided by babel and the related language style les, like "=, "~ or "-.
Set it to an empty string or nil in order to disable language-specic hyphen insertion.
[User Option] LaTeX-babel-hyphen-after-hyphen
Control insertion of hyphen strings. If non-nil insert normal hyphen on rst key
press and swap it with the language-specic hyphen string specied in the variable
LaTeX-babel-hyphen on second key press. If nil do it the other way round.
5.4.2 Using AUCT
E
X with Japanese T
E
X
To write Japanese text with AUCT
E
X, you need to have versions of T
E
X and Emacs that
support Japanese. There exist at least two variants of T
E
X for Japanese text (NTT jT
E
X
and ASCII pT
E
X). AUCT
E
X can be used with MULE (MULtilingual Enhancement to GNU
Emacs) supported Emacsen.
To use the Japanese T
E
X variants, simply activate japanese-plain-tex-mode or
japanese-latex-mode and everything should work. If not, send mail to Masayuki Ataka
<[email protected]>, who kindly donated the code for supporting Japanese in
AUCT
E
X. None of the primary AUCT
E
X maintainers understand Japanese, so they cannot
help you.
If you usually use AUCT
E
X in Japanese, setting the following variables is useful.
Chapter 5: Customization and Extension 61
[User Option] TeX-default-mode
Mode to enter for a new le when it cannott be determined whether the le is plain
T
E
X or L
a
T
E
X or what.
If you want to enter Japanese L
a
T
E
X mode whenever this may happen, set the variable
like this:
(setq TeX-default-mode japanese-latex-mode)
[User Option] japanese-TeX-command-default
The default command for TeX-command in Japanese T
E
X mode.
The default value is "pTeX".
[User Option] japanese-LaTeX-command-default
The default command for TeX-command in Japanese L
a
T
E
X mode.
The default value is "LaTeX".
[User Option] japanese-LaTeX-default-style
The default style/class when creating a new Japanese L
a
T
E
X document.
The default value is "jarticle".
See tex-jp.el for more information.
5.5 Automatic Customization
Since AUCT
E
X is so highly customizable, it makes sense that it is able to customize it-
self. The automatic customization consists of scanning T
E
X les and extracting symbols,
environments, and things like that.
The automatic customization is done on three dierent levels. The global level is the
level shared by all users at your site, and consists of scanning the standard T
E
X style les,
and any extra styles added locally for all users on the site. The private level deals with
those style les you have written for your own use, and use in dierent documents. You
may have a ~/lib/TeX/ directory where you store useful style les for your own use. The
local level is for a specic directory, and deals with writing customization for the les for
your normal T
E
X documents.
If compared with the environment variable TEXINPUTS, the global level corresponds to
the directories built into T
E
X. The private level corresponds to the directories you add
yourself, except for ., which is the local level.
By default AUCT
E
X will search for customization les in all the global, private, and local
style directories, but you can also set the path directly. This is useful if you for example
want to add another persons style hooks to your path. Please note that all matching les
found in TeX-style-path are loaded, and all hooks dened in the les will be executed.
[User Option] TeX-style-path
List of directories to search for AUCT
E
X style les. Each must end with a slash.
By default, when AUCT
E
X searches a directory for les, it will recursively search through
subdirectories.
Chapter 5: Customization and Extension 62
[User Option] TeX-file-recurse
Whether to search T
E
X directories recursively: nil means do not recurse, a positive
integer means go that far deep in the directory hierarchy, t means recurse indenitely.
By default, AUCT
E
X will ignore les named ., .., SCCS, RCS, and CVS.
[User Option] TeX-ignore-file
Regular expression matching le names to ignore.
These les or directories will not be considered when searching for T
E
X les in a
directory.
5.5.1 Automatic Customization for the Site
Assuming that the automatic customization at the global level was done when AUCT
E
X was
installed, your choice is now: will you use it? If you use it, you will benet by having access
to all the symbols and environments available for completion purposes. The drawback is
slower load time when you edit a new le and perhaps too many confusing symbols when
you try to do a completion.
You can disable the automatic generated global style hooks by setting the variable TeX-
auto-global to nil.
[User Option] TeX-macro-global
Directories containing the sites T
E
X style les.
[User Option] TeX-style-global
Directory containing hand generated T
E
X information. Must end with a slash.
These correspond to T
E
X macros shared by all users of a site.
[User Option] TeX-auto-global
Directory containing automatically generated information.
For storing automatic extracted information about the T
E
X macros shared by all users
of a site.
5.5.2 Automatic Customization for a User
You should specify where you store your private T
E
X macros, so AUCT
E
X can extract
their information. The extracted information will go to the directories listed in TeX-auto-
private
Use M-x TeX-auto-generate RET to extract the information.
[User Option] TeX-macro-private
Directories where you store your personal T
E
X macros. The value defaults to the
directories listed in the TEXINPUTS and BIBINPUTS environment variables or to the
respective directories in $TEXMFHOME if no results can be obtained from the environ-
ment variables.
[User Option] TeX-auto-private
List of directories containing automatically generated AUCT
E
X style les. These
correspond to the personal T
E
X macros.
Chapter 5: Customization and Extension 63
[Command] TeX-auto-generate TEX AUTO
(M-x TeX-auto-generate RET) Generate style hook for TEX and store it in AUTO.
If TEX is a directory, generate style hooks for all les in the directory.
[User Option] TeX-style-private
List of directories containing hand generated AUCT
E
X style les. These correspond
to the personal T
E
X macros.
5.5.3 Automatic Customization for a Directory
AUCT
E
X can update the style information about a le each time you save it, and it will do
this if the directory TeX-auto-local exist. TeX-auto-local is by default set to "auto",
so simply creating an auto directory will enable automatic saving of style information.
The advantage of doing this is that macros, labels, etc. dened in any le in a multile
document will be known in all the les in the document. The disadvantage is that saving
will be slower. To disable, set TeX-auto-local to nil.
[User Option] TeX-style-local
Directory containing hand generated T
E
X information. Must end with a slash.
These correspond to T
E
X macros found in the current directory.
[User Option] TeX-auto-local
Directory containing automatically generated T
E
X information. Must end with a
slash.
These correspond to T
E
X macros found in the current directory.
5.6 Writing Your Own Style Support
See Section 5.5 [Automatic], page 61, for a discussion about automatically generated global,
private, and local style les. The hand generated style les are equivalent, except that they
by default are found in style directories instead of auto directories.
If you write some useful support for a public T
E
X style le, please send it to us.
5.6.1 A Simple Style File
Here is a simple example of a style le.
;;; book.el - Special code for book style.
(TeX-add-style-hook
"book"
(lambda ()
(LaTeX-largest-level-set "chapter")))
The example is from the AUCT
E
X sources and is loaded for any L
a
T
E
X document using
the book document class (or style before L
a
T
E
X2e). The le species that the largest kind
of section in such a document is chapter. The interesting thing to notice is that the style
le denes an (anonymous) function, and adds it to the list of loaded style hooks by calling
TeX-add-style-hook.
The rst time the user indirectly tries to access some style-specic information, such as
the largest sectioning command available, the style hooks for all les directly or indirectly
Chapter 5: Customization and Extension 64
read by the current document are executed. The actual les will only be evaluated once,
but the hooks will be called for each buer using the style le.
Note that the basename of the style le and the name of the style hook should usually
be identical.
[Function] TeX-add-style-hook style hook
Add hook to the list of functions to run when we use the T
E
X le style.
5.6.2 Adding Support for Macros
The most common thing to dene in a style hook is new symbols (T
E
X macros). Most likely
along with a description of the arguments to the function, since the symbol itself can be
dened automatically.
Here are a few examples from latex.el.
(TeX-add-style-hook
"latex"
(lambda ()
(TeX-add-symbols
("arabic" TeX-arg-counter)
("label" TeX-arg-define-label)
("ref" TeX-arg-label)
("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t)
("newtheorem" TeX-arg-define-environment
[ TeX-arg-environment "Numbered like" ]
t [ TeX-arg-counter "Within counter" ]))))
[Function] TeX-add-symbols symbol . . .
Add each symbol to the list of known symbols.
Each argument to TeX-add-symbols is a list describing one symbol. The head of the
list is the name of the symbol, the remaining elements describe each argument.
If there are no additional elements, the symbol will be inserted with point inside braces.
Otherwise, each argument of this function should match an argument of the T
E
X macro.
What is done depends on the argument type.
If a macro is dened multiple times, AUCT
E
X will chose the one with the longest de-
nition (i.e. the one with the most arguments).
Thus, to overwrite
("tref" 1) ; one argument
you can specify
("tref" TeX-arg-label ignore) ; two arguments
ignore is a function that does not do anything, so when you insert a tref you will be
prompted for a label and no more.
You can use the following types of speciers for arguments:
string Use the string as a prompt to prompt for the argument.
Chapter 5: Customization and Extension 65
number Insert that many braces, leave point inside the rst. 0 and -1 are special. 0
means that no braces are inserted. -1 means that braces are inserted around the
macro and an active region (e.g. {\tiny foo}). If there is no active region,
no braces are inserted.
nil Insert empty braces.
t Insert empty braces, leave point between the braces.
other symbols
Call the symbol as a function. You can dene your own hook, or use one of the
predened argument hooks.
list If the car is a string, insert it as a prompt and the next element as initial input.
Otherwise, call the car of the list with the remaining elements as arguments.
vector Optional argument. If it has more than one element, parse it as a list, otherwise
parse the only element as above. Use square brackets instead of curly braces,
and is not inserted on empty user input.
A lot of argument hooks have already been dened. The rst argument to all hooks is
a ag indicating if it is an optional argument. It is up to the hook to determine what to
do with the remaining arguments, if any. Typically the next argument is used to overwrite
the default prompt.
TeX-arg-conditional
Implements if EXPR THEN ELSE. If EXPR evaluates to true, parse THEN as
an argument list, else parse ELSE as an argument list.
TeX-arg-literal
Insert its arguments into the buer. Used for specifying extra syntax for a
macro.
TeX-arg-free
Parse its arguments but use no braces when they are inserted.
TeX-arg-eval
Evaluate arguments and insert the result in the buer.
TeX-arg-label
Prompt for a label completing with known labels.
TeX-arg-macro
Prompt for a T
E
X macro with completion.
TeX-arg-environment
Prompt for a L
a
T
E
X environment with completion.
TeX-arg-cite
Prompt for a BibT
E
X citation.
TeX-arg-counter
Prompt for a L
a
T
E
X counter.
TeX-arg-savebox
Prompt for a L
a
T
E
X savebox.
Chapter 5: Customization and Extension 66
TeX-arg-file
Prompt for a lename in the current directory, and use it without the extension.
TeX-arg-input-file
Prompt for the name of an input le in T
E
Xs search path, and use it without
the extension. Run the style hooks for the le. (Note that the behavior (type of
prompt and inserted le name) of the function can be controlled by the variable
TeX-arg-input-file-search.)
TeX-arg-define-label
Prompt for a label completing with known labels. Add label to list of dened
labels.
TeX-arg-define-macro
Prompt for a T
E
X macro with completion. Add macro to list of dened macros.
TeX-arg-define-environment
Prompt for a L
a
T
E
X environment with completion. Add environment to list of
dened environments.
TeX-arg-define-cite
Prompt for a BibT
E
X citation.
TeX-arg-define-counter
Prompt for a L
a
T
E
X counter.
TeX-arg-define-savebox
Prompt for a L
a
T
E
X savebox.
TeX-arg-corner
Prompt for a L
a
T
E
X side or corner position with completion.
TeX-arg-lr
Prompt for a L
a
T
E
X side with completion.
TeX-arg-tb
Prompt for a L
a
T
E
X side with completion.
TeX-arg-pagestyle
Prompt for a L
a
T
E
X pagestyle with completion.
TeX-arg-verb
Prompt for delimiter and text.
TeX-arg-pair
Insert a pair of numbers, use arguments for prompt. The numbers are sur-
rounded by parentheses and separated with a comma.
TeX-arg-size
Insert width and height as a pair. No arguments.
TeX-arg-coordinate
Insert x and y coordinates as a pair. No arguments.
If you add new hooks, you can assume that point is placed directly after the previous
argument, or after the macro name if this is the rst argument. Please leave point located
Chapter 5: Customization and Extension 67
after the argument you are inserting. If you want point to be located somewhere else after
all hooks have been processed, set the value of exit-mark. It will point nowhere, until the
argument hook sets it.
5.6.3 Adding Support for Environments
Adding support for environments is very much like adding support for T
E
X macros, except
that each environment normally only takes one argument, an environment hook. The
example is again a short version of latex.el.
(TeX-add-style-hook
"latex"
(lambda ()
(LaTeX-add-environments
("document" LaTeX-env-document)
("enumerate" LaTeX-env-item)
("itemize" LaTeX-env-item)
("list" LaTeX-env-list))))
It is completely up to the environment hook to insert the environment, but the function
LaTeX-insert-environment may be of some help. The hook will be called with the name
of the environment as its rst argument, and extra arguments can be provided by adding
them to a list after the hook.
For simple environments with arguments, for example dened with \newenvironment,
you can make AUCT
E
X prompt for the arguments by giving the prompt strings in the call
to LaTeX-add-environments. The fact that an argument is optional can be indicated by
wrapping the prompt string in a vector.
For example, if you have dened a loop environment with the three arguments from, to,
and step, you can add support for them in a style le.
%% loop.sty
\newenvironment{loop}[3]{...}{...}
;; loop.el
(TeX-add-style-hook
"loop"
(lambda ()
(LaTeX-add-environments
("loop" "From" "To" "Step"))))
If an environment is dened multiple times, AUCT
E
X will choose the one with the longest
denition. Thus, if you have an enumerate style le, and want it to replace the standard
L
a
T
E
X enumerate hook above, you could dene an enumerate.el le as follows, and place
it in the appropriate style directory.
(TeX-add-style-hook
"latex"
(lambda ()
(LaTeX-add-environments
("enumerate" LaTeX-env-enumerate foo))))
Chapter 5: Customization and Extension 68
(defun LaTeX-env-enumerate (environment &optional ignore) ...)
The symbol foo will be passed to LaTeX-env-enumerate as the second argument, but
since we only added it to overwrite the denition in latex.el it is just ignored.
[Function] LaTeX-add-environments env . . .
Add each env to list of loaded environments.
[Function] LaTeX-insert-environment env [ extra ]
Insert environment of type env, with optional argument extra.
Following is a list of available hooks for LaTeX-add-environments:
LaTeX-env-item
Insert the given environment and the rst item.
LaTeX-env-figure
Insert the given gure-like environment with a caption and a label.
LaTeX-env-array
Insert the given array-like environment with position and column specications.
LaTeX-env-label
Insert the given environment with a label.
LaTeX-env-list
Insert the given list-like environment, a specier for the label and the rst item.
LaTeX-env-minipage
Insert the given minipage-like environment with position and width specica-
tions.
LaTeX-env-tabular*
Insert the given tabular*-like environment with width, position and column
specications.
LaTeX-env-picture
Insert the given environment with width and height specications.
LaTeX-env-bib
Insert the given environment with a label for a bibitem.
LaTeX-env-contents
Insert the given environment with a lename as its argument.
LaTeX-env-args
Insert the given environment with arguments. You can use this as a hook in
case you want to specify multiple complex arguments just like in elements of
TeX-add-symbols. This is most useful if the specication of arguments to be
prompted for with strings and strings wrapped in a vector as described above
is too limited.
Here is an example from listings.el which calls a function with one ar-
gument in order to prompt for a key=value list to be inserted as an optional
argument of the lstlisting environment:
Chapter 5: Customization and Extension 69
(LaTeX-add-environments
("lstlisting" LaTeX-env-args
[TeX-arg-key-val ,LaTeX-listings-key-val-options]))
5.6.4 Adding Other Information
You can also specify bibliographical databases and labels in the style le. This is probably
of little use, since this information will usually be automatically generated from the T
E
X
le anyway.
[Function] LaTeX-add-bibliographies bibliography . . .
Add each bibliography to list of loaded bibliographies.
[Function] LaTeX-add-labels label . . .
Add each label to the list of known labels.
5.6.5 Automatic Extraction of New Things
The automatic T
E
X information extractor works by searching for regular expressions in the
T
E
X les, and storing the matched information. You can add support for new constructs
to the parser, something that is needed when you add new commands to dene symbols.
For example, in the le macro.tex I dene the following macro.
\newcommand{\newmacro}[5]{%
\def#1{#3\index{#4@#5~cite{#4}}\nocite{#4}}%
\def#2{#5\index{#4@#5~cite{#4}}\nocite{#4}}%
}
AUCT
E
X will automatically gure out that newmacro is a macro that takes ve argu-
ments. However, it is not smart enough to automatically see that each time we use the
macro, two new macros are dened. We can specify this information in a style hook le.
;;; macro.el --- Special code for my own macro file.
;;; Code:
(defvar TeX-newmacro-regexp
("\\\\newmacro{\\\\\\([a-zA-Z]+\\)}{\\\\\\([a-zA-Z]+\\)}"
(1 2) TeX-auto-multi)
"Matches \newmacro definitions.")
(defvar TeX-auto-multi nil
"Temporary for parsing \\newmacro definitions.")
(defun TeX-macro-cleanup ()
"Move symbols from TeX-auto-multi to TeX-auto-symbol."
(mapcar (lambda (list)
(mapcar (lambda (symbol)
(setq TeX-auto-symbol
(cons symbol TeX-auto-symbol)))
list))
Chapter 5: Customization and Extension 70
TeX-auto-multi))
(defun TeX-macro-prepare ()
"Clear Tex-auto-multi before use."
(setq TeX-auto-multi nil))
(add-hook TeX-auto-prepare-hook TeX-macro-prepare)
(add-hook TeX-auto-cleanup-hook TeX-macro-cleanup)
(TeX-add-style-hook
"macro"
(lambda ()
(TeX-auto-add-regexp TeX-newmacro-regexp)
(TeX-add-symbols ("newmacro"
TeX-arg-macro
(TeX-arg-macro "Capitalized macro: \\")
t
"BibTeX entry: "
nil))))
;;; macro.el ends here
When this le is rst loaded, it adds a new entry to TeX-newmacro-regexp, and denes
a function to be called before the parsing starts, and one to be called after the parsing is
done. It also declares a variable to contain the data collected during parsing. Finally, it
adds a style hook which describes the newmacro macro, as we have seen it before.
So the general strategy is: Add a new entry to TeX-newmacro-regexp. Declare a variable
to contain intermediate data during parsing. Add hook to be called before and after parsing.
In this case, the hook before parsing just initializes the variable, and the hook after parsing
collects the data from the variable, and adds them to the list of symbols found.
[Variable] TeX-auto-regexp-list
List of regular expressions matching T
E
X macro denitions.
The list has the following format ((REGEXP MATCH TABLE) . . . ), that is, each
entry is a list with three elements.
REGEXP. Regular expression matching the macro we want to parse.
MATCH. A number or list of numbers, each representing one parenthesized subex-
pression matched by REGEXP.
TABLE. The symbol table to store the data. This can be a function, in which case the
function is called with the argument MATCH. Use TeX-match-buffer to get match
data. If it is not a function, it is presumed to be the name of a variable containing
a list of match data. The matched data (a string if MATCH is a number, a list of
strings if MATCH is a list of numbers) is put in front of the table.
[Variable] TeX-auto-prepare-hook nil
List of functions to be called before parsing a T
E
X le.
Chapter 5: Customization and Extension 71
[Variable] TeX-auto-cleanup-hook nil
List of functions to be called after parsing a T
E
X le.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 72
Appendix A Copying, Changes, Development,
FAQ, Texinfo Mode
A.1 Copying this Manual
The full license text can be read here:
A.1.1 GNU Free Documentation License
Version 1.3, 3 November 2008
Copyright c 2000, 2001, 2002, 2007, 2008 Free Software
Foundation, Inc. http://fsf.org/
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other functional and
useful document free in the sense of freedom: to assure everyone the eective freedom
to copy and redistribute it, with or without modifying it, either commercially or non-
commercially. Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible for modications
made by others.
This License is a kind of copyleft, which means that derivative works of the document
must themselves be free in the same sense. It complements the GNU General Public
License, which is a copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because
free software needs free documentation: a free program should come with manuals
providing the same freedoms that the software does. But this License is not limited to
software manuals; it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License principally for
works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that contains a
notice placed by the copyright holder saying it can be distributed under the terms
of this License. Such a notice grants a world-wide, royalty-free license, unlimited in
duration, to use that work under the conditions stated herein. The Document,
below, refers to any such manual or work. Any member of the public is a licensee, and
is addressed as you. You accept the license if you copy, modify or distribute the work
in a way requiring permission under copyright law.
A Modied Version of the Document means any work containing the Document or
a portion of it, either copied verbatim, or with modications and/or translated into
another language.
A Secondary Section is a named appendix or a front-matter section of the Document
that deals exclusively with the relationship of the publishers or authors of the Document
to the Documents overall subject (or to related matters) and contains nothing that
could fall directly within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any mathematics.) The
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 73
relationship could be a matter of historical connection with the subject or with related
matters, or of legal, commercial, philosophical, ethical or political position regarding
them.
The Invariant Sections are certain Secondary Sections whose titles are designated, as
being those of Invariant Sections, in the notice that says that the Document is released
under this License. If a section does not t the above denition of Secondary then it is
not allowed to be designated as Invariant. The Document may contain zero Invariant
Sections. If the Document does not identify any Invariant Sections then there are none.
The Cover Texts are certain short passages of text that are listed, as Front-Cover
Texts or Back-Cover Texts, in the notice that says that the Document is released under
this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.
A Transparent copy of the Document means a machine-readable copy, represented
in a format whose specication is available to the general public, that is suitable for
revising the document straightforwardly with generic text editors or (for images com-
posed of pixels) generic paint programs or (for drawings) some widely available drawing
editor, and that is suitable for input to text formatters or for automatic translation to
a variety of formats suitable for input to text formatters. A copy made in an otherwise
Transparent le format whose markup, or absence of markup, has been arranged to
thwart or discourage subsequent modication by readers is not Transparent. An image
format is not Transparent if used for any substantial amount of text. A copy that is
not Transparent is called Opaque.
Examples of suitable formats for Transparent copies include plain ascii without
markup, Texinfo input format, LaT
E
X input format, SGML or XML using a publicly
available DTD, and standard-conforming simple HTML, PostScript or PDF designed for
human modication. Examples of transparent image formats include PNG, XCF and
JPG. Opaque formats include proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or processing
tools are not generally available, and the machine-generated HTML, PostScript or PDF
produced by some word processors for output purposes only.
The Title Page means, for a printed book, the title page itself, plus such following
pages as are needed to hold, legibly, the material this License requires to appear in the
title page. For works in formats which do not have any title page as such, Title Page
means the text near the most prominent appearance of the works title, preceding the
beginning of the body of the text.
The publisher means any person or entity that distributes copies of the Document
to the public.
A section Entitled XYZ means a named subunit of the Document whose title either
is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in
another language. (Here XYZ stands for a specic section name mentioned below, such
as Acknowledgements, Dedications, Endorsements, or History.) To Preserve
the Title of such a section when you modify the Document means that it remains a
section Entitled XYZ according to this denition.
The Document may include Warranty Disclaimers next to the notice which states that
this License applies to the Document. These Warranty Disclaimers are considered to
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 74
be included by reference in this License, but only as regards disclaiming warranties:
any other implication that these Warranty Disclaimers may have is void and has no
eect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially or
noncommercially, provided that this License, the copyright notices, and the license
notice saying this License applies to the Document are reproduced in all copies, and
that you add no other conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further copying of the copies
you make or distribute. However, you may accept compensation in exchange for copies.
If you distribute a large enough number of copies you must also follow the conditions
in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly
display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of
the Document, numbering more than 100, and the Documents license notice requires
Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify you as the publisher
of these copies. The front cover must present the full title with all words of the title
equally prominent and visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve the title of the
Document and satisfy these conditions, can be treated as verbatim copying in other
respects.
If the required texts for either cover are too voluminous to t legibly, you should put
the rst ones listed (as many as t reasonably) on the actual cover, and continue the
rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100,
you must either include a machine-readable Transparent copy along with each Opaque
copy, or state in or with each Opaque copy a computer-network location from which
the general network-using public has access to download using public-standard network
protocols a complete Transparent copy of the Document, free of added material. If
you use the latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this Transparent copy will
remain thus accessible at the stated location until at least one year after the last time
you distribute an Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the Document well
before redistributing any large number of copies, to give them a chance to provide you
with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modied Version of the Document under the conditions
of sections 2 and 3 above, provided that you release the Modied Version under precisely
this License, with the Modied Version lling the role of the Document, thus licensing
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 75
distribution and modication of the Modied Version to whoever possesses a copy of
it. In addition, you must do these things in the Modied Version:
A. Use in the Title Page (and on the covers, if any) a title distinct from that of the
Document, and from those of previous versions (which should, if there were any,
be listed in the History section of the Document). You may use the same title as
a previous version if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities responsible for
authorship of the modications in the Modied Version, together with at least ve
of the principal authors of the Document (all of its principal authors, if it has fewer
than ve), unless they release you from this requirement.
C. State on the Title page the name of the publisher of the Modied Version, as the
publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modications adjacent to the other
copyright notices.
F. Include, immediately after the copyright notices, a license notice giving the public
permission to use the Modied Version under the terms of this License, in the form
shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required Cover
Texts given in the Documents license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled History, Preserve its Title, and add to it an item
stating at least the title, year, new authors, and publisher of the Modied Version
as given on the Title Page. If there is no section Entitled History in the Docu-
ment, create one stating the title, year, authors, and publisher of the Document
as given on its Title Page, then add an item describing the Modied Version as
stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access to
a Transparent copy of the Document, and likewise the network locations given in
the Document for previous versions it was based on. These may be placed in the
History section. You may omit a network location for a work that was published
at least four years before the Document itself, or if the original publisher of the
version it refers to gives permission.
K. For any section Entitled Acknowledgements or Dedications, Preserve the Title
of the section, and preserve in the section all the substance and tone of each of the
contributor acknowledgements and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their text and
in their titles. Section numbers or the equivalent are not considered part of the
section titles.
M. Delete any section Entitled Endorsements. Such a section may not be included
in the Modied Version.
N. Do not retitle any existing section to be Entitled Endorsements or to conict in
title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 76
If the Modied Version includes new front-matter sections or appendices that qualify
as Secondary Sections and contain no material copied from the Document, you may at
your option designate some or all of these sections as invariant. To do this, add their
titles to the list of Invariant Sections in the Modied Versions license notice. These
titles must be distinct from any other section titles.
You may add a section Entitled Endorsements, provided it contains nothing but
endorsements of your Modied Version by various partiesfor example, statements of
peer review or that the text has been approved by an organization as the authoritative
denition of a standard.
You may add a passage of up to ve words as a Front-Cover Text, and a passage of up
to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modied
Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be
added by (or through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or by arrangement
made by the same entity you are acting on behalf of, you may not add another; but
you may replace the old one, on explicit permission from the previous publisher that
added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission
to use their names for publicity for or to assert or imply endorsement of any Modied
Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License,
under the terms dened in section 4 above for modied versions, provided that you
include in the combination all of the Invariant Sections of all of the original documents,
unmodied, and list them all as Invariant Sections of your combined work in its license
notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical
Invariant Sections may be replaced with a single copy. If there are multiple Invariant
Sections with the same name but dierent contents, make the title of each such section
unique by adding at the end of it, in parentheses, the name of the original author or
publisher of that section if known, or else a unique number. Make the same adjustment
to the section titles in the list of Invariant Sections in the license notice of the combined
work.
In the combination, you must combine any sections Entitled History in the vari-
ous original documents, forming one section Entitled History; likewise combine any
sections Entitled Acknowledgements, and any sections Entitled Dedications. You
must delete all sections Entitled Endorsements.
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released
under this License, and replace the individual copies of this License in the various
documents with a single copy that is included in the collection, provided that you
follow the rules of this License for verbatim copying of each of the documents in all
other respects.
You may extract a single document from such a collection, and distribute it individu-
ally under this License, provided you insert a copy of this License into the extracted
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 77
document, and follow this License in all other respects regarding verbatim copying of
that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate and independent
documents or works, in or on a volume of a storage or distribution medium, is called
an aggregate if the copyright resulting from the compilation is not used to limit the
legal rights of the compilations users beyond what the individual works permit. When
the Document is included in an aggregate, this License does not apply to the other
works in the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document,
then if the Document is less than one half of the entire aggregate, the Documents Cover
Texts may be placed on covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form. Otherwise they
must appear on printed covers that bracket the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modication, so you may distribute translations
of the Document under the terms of section 4. Replacing Invariant Sections with
translations requires special permission from their copyright holders, but you may
include translations of some or all Invariant Sections in addition to the original versions
of these Invariant Sections. You may include a translation of this License, and all the
license notices in the Document, and any Warranty Disclaimers, provided that you
also include the original English version of this License and the original versions of
those notices and disclaimers. In case of a disagreement between the translation and
the original version of this License or a notice or disclaimer, the original version will
prevail.
If a section in the Document is Entitled Acknowledgements, Dedications, or His-
tory, the requirement (section 4) to Preserve its Title (section 1) will typically require
changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly
provided under this License. Any attempt otherwise to copy, modify, sublicense, or
distribute it is void, and will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license from a particular
copyright holder is reinstated (a) provisionally, unless and until the copyright holder
explicitly and nally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means prior to 60 days
after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if
the copyright holder noties you of the violation by some reasonable means, this is the
rst time you have received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after your receipt of the
notice.
Termination of your rights under this section does not terminate the licenses of parties
who have received copies or rights from you under this License. If your rights have
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 78
been terminated and not permanently reinstated, receipt of a copy of some or all of the
same material does not give you any rights to use it.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU Free
Documentation License from time to time. Such new versions will be similar in spirit
to the present version, but may dier in detail to address new problems or concerns.
See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document
species that a particular numbered version of this License or any later version
applies to it, you have the option of following the terms and conditions either of that
specied version or of any later version that has been published (not as a draft) by
the Free Software Foundation. If the Document does not specify a version number of
this License, you may choose any version ever published (not as a draft) by the Free
Software Foundation. If the Document species that a proxy can decide which future
versions of this License can be used, that proxys public statement of acceptance of a
version permanently authorizes you to choose that version for the Document.
11. RELICENSING
Massive Multiauthor Collaboration Site (or MMC Site) means any World Wide
Web server that publishes copyrightable works and also provides prominent facilities
for anybody to edit those works. A public wiki that anybody can edit is an example of
such a server. A Massive Multiauthor Collaboration (or MMC) contained in the
site means any set of copyrightable works thus published on the MMC site.
CC-BY-SA means the Creative Commons Attribution-Share Alike 3.0 license pub-
lished by Creative Commons Corporation, a not-for-prot corporation with a principal
place of business in San Francisco, California, as well as future copyleft versions of that
license published by that same organization.
Incorporate means to publish or republish a Document, in whole or in part, as part
of another Document.
An MMC is eligible for relicensing if it is licensed under this License, and if all works
that were rst published under this License somewhere other than this MMC, and
subsequently incorporated in whole or in part into the MMC, (1) had no cover texts
or invariant sections, and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site under
CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is
eligible for relicensing.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 79
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of the License in the
document and put the following copyright and license notices just after the title page:
Copyright (C) year your name.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled GNU
Free Documentation License.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the
with. . . Texts. line with this:
with the Invariant Sections being list their titles, with
the Front-Cover Texts being list, and with the Back-Cover Texts
being list.
If you have Invariant Sections without Cover Texts, or some other combination of the
three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing
these examples in parallel under your choice of free software license, such as the GNU
General Public License, to permit their use in free software.
A.2 Changes and New Features
News since 11.87
AUCT
E
X now supports Biber in conjunction with biblatex in addition to BibTeX.
Each AUCT
E
X mode now has its own abbrev table. On Emacsen which provide the
possibility to inherit abbrevs from other tables, the abbrevs from the Text mode abbrev
table are available as well. Newly dened abbrevs are written to the mode-specic
tables, though.
The le tex-fptex.el was removed.
Forward/backward search for Evince has been improved. If Emacs is compiled with
DBUS support and a recent Evince version (3.x) is installed, the communication goes
over the desktop bus instead of the command line, resulting in more accurate positioning
of point in Emacs and highlighting of the target paragraph in Evince.
A problem where Ghostscript threw an /invalidleaccess error when running preview-
latex was xed.
A lot of smaller xes and additions have been made.
News in 11.86
Parsing of L
a
T
E
X output was improved. It is now less likely that AUCT
E
X opens a
non-existent le upon calling TeX-next-error; a problem for example encountered
when using MiKT
E
X 2.8. In addition quoted le names as emitted by MiKT
E
X are
now supported.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 80
A new framework for the denition and selection of viewers was implemented. If you
have customizations regarding viewers you will have to redo them in this new framework
or reenable the old one. See Section 4.2.1 [Starting Viewers], page 49, for details.
Comprehensive editing support for PSTricks was added.
Support for various L
a
T
E
X packages was added, e.g. tabularx, CJK, and hyperref.
An easy way to switch between T
E
X engines (PDFT
E
X, LuaT
E
X, XeT
E
X, Omega) was
added.
Support for SyncT
E
X was added. This involves the command line options for L
a
T
E
X
and the viewer.
Folding can now be customized to use macro arguments as replacement text.
preview.sty now works with XeT
E
X.
A lot of smaller and larger bugs have been squashed.
News in 11.85
Font locking has been improved signicantly. It is now less prone to color bleeding
which could lead to high resource usage. In addition it now includes information about
L
a
T
E
X macro syntax and can indicate syntactically incorrect macros in L
a
T
E
X mode.
The license was updated to GPLv3.
Support for the nomencl, ashcards and comment L
a
T
E
X packages as well as the Ice-
landic language option of babel were added.
Support for folding of math macros was added.
Lots of minor bugs in features and documentation xed.
News in 11.84
There have been problems with the -without-texmf-dir option to configure when
the value of -with-kpathsea-sep was set or determined for an installation system
with a default dierent from that of the runtime system. with-kpathsea-sep has been
removed; the setting is now usually determined at runtime.
Due to this and other problems, preview-latex in the released XEmacs package failed
under Windows or with anything except recent 21.5 XEmacsen.
AUCT
E
X and preview-latex have been changed in order to accommodate le names
containing spaces. preview-latex now tolerates bad PostScript code polluting the stack
(like some Omega fonts).
preview.sty had in some cases failed to emit PostScript header specials.
Support for folding of comments was added.
The polish language option of the babel LaTeX package as well as the polski LaTeX
package are now supported. Most notably this means that AUCTeX will help to insert
quotation marks as dened by polish.sty ("...") and polski.sty (,,...).
The T
E
X tool bar is now available and enabled by default in plain T
E
X mode. See
Section 1.3.2 [Processing Facilities], page 18.
Bug x in the display of math subscripts and superscripts.
Bug x TeX-doc for Emacs 21.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 81
There has been quite a number of other bug xes to various features and documentation
across the board.
News in 11.83
The new function TeX-doc provides easy access to documentation about commands
and packages or information related to T
E
X and friends in general. See Section 4.7
[Documentation], page 53.
You can now get rid of generated intermediate and output les by means of the new
Clean and Clean All entries in TeX-command-list accessible with C-c C-c or the
Command menu. See Section 4.6 [Cleaning], page 53.
Support for forward search with PDF les was added. That means you can jump to a
place in the output le corresponding to the position in the source le. See Section 4.2
[Viewing], page 49.
Adding support for this feature required the default value of the variable TeX-output-
view-style to be changed. Please make sure you either remove any customizations
overriding the new default or incorporate the changes into your customizations if you
want to use this feature.
T
E
X error messages of the -file-line-error kind are now understood in AUCT
E
X
and preview-latex (parsers are still separate).
Bug x in XyMT
E
X support.
The L
a
T
E
X tool bar is now enabled by default. See Section 1.3.2 [Processing Facilities],
page 18.
News in 11.82
Support for the MinionPro LaTeX package was added.
Warnings and underfull/overfull boxes are now being indicated in the echo area after a
L
a
T
E
X run, if the respective debugging options are activated with TeX-toggle-debug-
warnings (C-c C-t C-w) or TeX-toggle-debug-bad-boxes (C-c C-t C-b). In this case
TeX-next-error will nd these warnings in addition to normal errors.
The key binding C-c C-w for TeX-toggle-debug-bad-boxes (which was renamed from
TeX-toggle-debug-boxes) now is deprecated.
AUCT
E
X now can automatically insert a pair of braces after typing or ^ in math
constructs if the new variable TeX-electric-sub-and-superscript is set to a non-nil
value.
Some language-specic support for French was added. There now is completion support
for the commands provided by the frenchb (and francais) options of the babel
L
a
T
E
X package and easier input of French quotation marks (\\og ...\\fg) which can
now be inserted by typing ".
Completion support for options of some LaTeX packages was added.
Already in version 11.81 the way to activate AUCT
E
X changed substantially. This
should now be done with (load "auctex.el" nil t t) instead of the former (require
tex-site). Related to this change tex-mik.el does not load tex-site.el
anymore. That means if you used only (require tex-mik) in order to activate
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 82
AUCT
E
X, you have to add (load "auctex.el" nil t t) before the latter statement.
See Section 1.2.4 [Loading the package], page 7.
Handling of verbatim constructs was consolidated across AUCTeX. This resulted
in the font-latex-specic variables font-latex-verb-like-commands, font-latex-
verbatim-macros, and font-latex-verbatim-environments being removed and
the more general variables LaTeX-verbatim-macros-with-delims, LaTeX-verbatim-
macros-with-braces, and LaTeX-verbatim-environments being added.
The output of a BibT
E
X run is now checked for warnings and errors, which are reported
in the echo area.
The aliases for font-latex-title-fontify were removed. Use font-latex-fontify-
sectioning instead.
The problem that Japanese macros where broken across lines was xed.
Various bug xes.
News in 11.81
LaTeX-mark-section now marks subsections of a given section as well. The former
behavior is available via the prex argument.
preview-latex which was previously available separately became a subsystem of
AUCT
E
X. There is no documented provision for building or installing preview-latex
separately. It is still possible to use and install AUCT
E
X without preview-latex, how-
ever.
The installation procedures have been overhauled and now also install startup les as
part of the process (those had to be copied manually previously). You are advised to
remove previous installations of AUCT
E
X and preview-latex before starting the installa-
tion procedure. A standard installation from an unmodied tarball no longer requires
Makeinfo or Perl.
Also note that the way AUCT
E
X is supposed to be activated changed. Instead of
(require tex-site) you should now use (load "auctex.el" nil t t). While the
former method may still work, the new method has the advantage that you can de-
activate a preactivated AUCT
E
X with the statement (unload-feature tex-site)
before any of its modes have been used. This may be important especially for site-wide
installations.
Support for the babel L
a
T
E
X package was added.
Folding a buer now ensures that the whole buer is fontied before the actual folding
is carried out. If this results in unbearably long execution times, you can fall back to
the old behavior of relying on stealth font locking to do this job in the background by
customizing the variable TeX-fold-force-fontify.
Folded content now reveals part of its original text in a tooltip or the echo area when
hovering with the mouse pointer over it.
The language-specic insertion of quotation marks was generalized. The
variables LaTeX-german-open-quote, LaTeX-german-close-quote, LaTeX-german-
quote-after-quote, LaTeX-italian-open-quote, LaTeX-italian-close-quote,
and LaTeX-italian-quote-after-quote are now obsolete. If you are not satised
with the default settings, you should customize TeX-quote-language-alist instead.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 83
Similar to language-specic quote insertion, AUCT
E
X now helps you with hyphens in
dierent languages as well. See Section 5.4.1 [European], page 58, for details.
Fill problems in Japanese text introduced in AUCT
E
X 11.55 were xed. AUCT
E
X tries
not to break lines between 1-byte and 2-byte chars. These features will work in Chinese
text, too.
The scaling factor of the fontication of sectioning commands can now be customized
using the variable font-latex-fontify-sectioning. This variable was previously
called font-latex-title-fontify; In this release we provide an alias but this will
disappear in one of the the next releases. The faces for the sectioning commands are now
called font-latex-sectioning-N-face (N=0. . . 5) instead of font-latex-title-N-
face (N=1. . . 4). Analogously the names of the variables holding the related keyword
lists were changed from font-latex-title-N-keywords to font-latex-sectioning-
N-keywords. See Section 3.1 [Font Locking], page 35, for details. Make sure to adjust
your customizations.
Titles in beamer slides marked by the \frametitle command are know displayed with
the new face font-latex-slide-title-face. You can add macros to be highlighted
with this face to font-latex-match-slide-title-keywords.
Of course a lot of bugs have been xed.
News in 11.55
A bug was xed which lead to the insertion of trailing whitespace during lling. In
particular extra spaces were added to sentence endings at the end of lines. You can
make this whitespace visible by setting the variable show-trailing-whitespace to t.
If you want to delete all trailing whitespace in a buer, type M-x delete-trailing-
whitespace RET.
A bug was xed which lead to a *Compile-Log* buer popping up when the rst
L
a
T
E
X le was loaded in an Emacs session.
On some systems the presence of an outdated Emacspeak package lead to the
error message File mode specification error: (error "Variable binding depth
exceeds max-specpdl-size"). Precautions were added which prevent this error from
happening. But nevertheless, it is advised to upgrade or uninstall the outdated Emac-
speak package.
The value of TeX-macro-global is not determined during conguration anymore
but at load time of AUCT
E
X. Consequently the associated conguration option
--with-tex-input-dirs was removed.
Support for the L
a
T
E
X Japanese classes jsarticle and jsbook was added.
News in 11.54
The parser (used e.g. for TeX-auto-generate-global) was extended to recognize
keywords common in L
a
T
E
X packages and classes, like \DeclareRobustCommand or
\RequirePackage. Additionally a bug was xed which led to duplicate entries in
AUCT
E
X style les.
Folding can now be done for paragraphs and regions besides single constructs and the
whole buer. With the new TeX-fold-dwim command content can both be hidden
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 84
and shown with a single key binding. In course of these changes new key bindings for
unfolding commands where introduced. The old bindings are still present but will be
phased out in future releases.
Info les of the manual now have a .info extension.
There is an experimental tool bar support now. It is not activated by default. If you
want to use it, add
(add-hook LaTeX-mode-hook LaTeX-install-toolbar)
to your init le.
The manual now contains a new chapter Quick Start. It explains the main features
and how to use them, and should be enough for a new user to start using AUCT
E
X.
A new section Font Locking was added to the manual which explains syntax high-
lighting in AUCT
E
X and its customization. Together with the sections related to folding
and outlining, the section is part of the new chapter Display.
Keywords for syntax highlighting of L
a
T
E
X constructs to be typeset in bold,
italic or typewriter fonts may now be customized. Besides the built-
in classes, new keyword classes may be added by customizing the variable
font-latex-user-keyword-classes. The customization options can be found in
the customization group font-latex-keywords.
Verbatim content is now displayed with the fixed-pitch face. (GNU Emacs only)
Syntax highlighting should not spill out of verbatim content anymore. (GNU Emacs
only)
Verbatim commands like \verb|...| will not be broken anymore during lling.
You can customize the completion for graphic les with LaTeX-includegraphics-
read-file.
Support for the L
a
T
E
X packages url, listings, jurabib and csquotes was added
with regard to command completion and syntax highlighting.
Performance of fontication and lling was improved.
Insertion of nodes in Texinfo mode now supports completion of existing node names.
Setting the variable LaTeX-float to nil now means that you will not be prompted for
the oat position of gures and tables. You can get the old behaviour of nil by setting
the variable to "", i.e. an empty string. See also Section 2.4.2 [Floats], page 25.
The XEmacs-specic bug concerning overlays-at was xed.
Lots of bug xes.
News in 11.53
The L
a
T
E
X math menu can include Unicode characters if your Emacs built supports it.
See the variable LaTeX-math-menu-unicode, Section 2.5 [Mathematics], page 26.
Bug xes for XEmacs.
Completion for graphic les in the TeX search path has been added.
start is used for the viewer for MiKT
E
X and fpT
E
X.
The variable TeX-fold-preserve-comments can now be customized to deactivate fold-
ing in comments.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 85
News in 11.52
Installation and menus under XEmacs work again (maybe for the rst time).
Fontication of subscripts and superscripts is now disabled when the fontication engine
is not able to support it properly.
Bug xes in the build process.
News in 11.51
PDFTeX and Source Special support did not work with ConTeXt, this has been xed.
Similar for Source Special support under Windows.
Omega support has been added.
Bug xes in the build process.
TeX-fold now supports folding of environments in Texinfo mode.
News in 11.50
The use of source specials when processing or viewing the document can now be con-
trolled with the new TeX-source-specials minor mode which can be toggled via an
entry in the Command menu or the key binding C-c C-t C-s. If you have customized
the variable TeX-command-list, you have to re-initialize it for this to work. This means
to open a customization buer for the variable by typing M-x customize-variable RET
TeX-command-list RET, selecting Erase Customization and do your customization
again with the new default.
The content of the command menu now depends on the mode (plain T
E
X, L
a
T
E
X,
ConT
E
Xt etc.). Any former customization of the variable TeX-command-list has to be
erased. Otherwise the command menu and the customization will not work correctly.
Support for hiding and auto-revealing macros, e.g. footnotes or citations, and environ-
ments in a buer was added, Section 3.2 [Folding], page 40.
You can now control if indentation is done upon typing RET by customizing the variable
TeX-newline-function, Section 2.9 [Indenting], page 30.
Limited support for doc.sty and ltxdoc.cls (dtx les) was added. The new docT
E
X
mode provides functionality for editing documentation parts. This includes formatting
(indenting and lling), adding and completion of macros and environments while stay-
ing in comments as well as syntax highlighting. (Please note that the mode is not
nished yet. For example syntax highlighting does not work yet in XEmacs.)
For macro completion in docT
E
X mode the AUCT
E
X style les doc.el, ltxdoc.el
and ltx-base.el were included. The latter provides general support for low-level
L
a
T
E
X macros and may be used with L
a
T
E
X class and style les as well. It is currently
not loaded automatically for those les.
Support for ConT
E
Xt with a separate ConT
E
Xt mode is now included. Macro deni-
tions for completion are available in Dutch and English.
The lling and indentation code was overhauled and is now able to format commented
parts of the source syntactically correct. Newly available functionality and customiza-
tion options are explained in the manual.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 86
Filling and indentation in XEmacs with preview-latex and activated previews lead to
the insertion of whitespace before multi-line previews. AUCT
E
X now contains facilities
to prevent this problem.
If TeX-master is set to t, AUCT
E
X will now query for a master le only when a new
le is opened. Existing les will be left alone. The new function TeX-master-file-ask
(bound to C-c _ is provided for adding the variable manually.
Sectioning commands are now shown in a larger font on display devices which support
such fontication. The variable font-latex-title-fontify can be customized to
restore the old appearance, i.e. the usage of a dierent color instead of a change in
size.
Support for alphanum.sty, beamer.cls, booktabs.sty, captcont.sty, emp.sty,
paralist.sty, subfigure.sty and units.sty/nicefrac.sty was added. Credits
go to the authors mentioned in the respective AUCT
E
X style les.
Inserting graphics with C-c RET \includegraphics RET was improved. See the vari-
able LaTeX-includegraphics-options-alist.
If LaTeX-default-position is nil, dont prompt for position arguments in Tabular-
like environments, see Section 2.4.4 [Tabular-like], page 26.
Completion for available packages when using C-c RET \usepackage RET was improved
on systems using the kpathsea library.
The commenting functionality was xed. The separate functions for commenting and
uncommenting were unied in one function for paragraphs and regions respectively
which do both.
Syntax highlighting can be customized to fontify quotes delimited by either >>Ger-
man<< or <<French>> quotation marks by changing the variable font-latex-quotes.
Certain T
E
X/L
a
T
E
X keywords for functions, references, variables and warnings will now
be fontied specially. You may add your own keywords by customizing the variables
font-latex-match-function-keywords, font-latex-match-reference-keywords,
font-latex-match-variable-keywords and font-latex-match-warning-keywords.
If you include the style les german or ngerman in a document (directly or via
the babel package), you should now customize LaTeX-german-open-quote, LaTeX-
german-close-quote and LaTeX-german-quote-after-quote instead of TeX-open-
quote, TeX-close-quote and TeX-quote-after-quote if you want to inuence the
type of quote insertion.
Upon viewing an output le, the right viewer and command line options for it are now
determined automatically by looking at the extension of the output le and certain
options used in the source le. The behavior can be adapted or extended respectively
by customizing the variable TeX-output-view-style.
You can control whether TeX-insert-macro (C-c RET) ask for all optional arguments
by customizing the variable TeX-insert-macro-default-style, Section 2.6 [Comple-
tion], page 27.
TeX-run-discard is now able to completely detach a process that it started.
The build process was enhanced and is now based on autoconf making installing
AUCT
E
X a mostly automatic process. See Section 1.2 [Installation], page 3 and
Section 1.2.7 [Installation under MS Windows], page 10 for details.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 87
News in 11.14
Many more LaTeX and LaTeX2e commands are supported. Done by Masayuki Ataka
<[email protected]>
News in 11.12
Support for the KOMA-Script classes. Contributed by Mark Trettin
<[email protected]>.
News in 11.11
Support for prosper.sty, see http://prosper.sourceforge.net/. Contributed by
Phillip Lord <[email protected]>.
News in 11.10
comment-region now inserts %% by default. Suggested by "Davide G. M. Salvetti"
<[email protected]>.
News in 11.06
You can now switch between using the font-latex (all emacsen), the tex-font
(Emacs 21 only) or no special package for font locking. Customize TeX-install-
font-lock for this.
News in 11.04
Now use -t landscape by default when landscape option appears. Suggested by Erik
Frisk <[email protected]>.
News in 11.03
Use tex-fptex.el for fpTeX support. Contributed by Fabrice Popineau <Fab-
[email protected]>.
News in 11.02
New user option LaTeX-top-caption-list species environments where the caption
should go at top. Contributed by [email protected] (Masayuki Ataka).
Allow explicit dimensions in graphicx.sty. Contributed by [email protected]
(Masayuki Ataka).
Limited support for verbatim.sty. Contributed by [email protected]
(Masayuki Ataka).
Better support for asmmath items. Patch by [email protected] (Masayuki
Ataka).
More accurate error parsing. Added by David Kastrup <[email protected]>.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 88
News in 11.01
Bug xes.
Older versions
See the le history.texi for older changes.
A.3 Future Development
The following sections describe future development of AUCT
E
X. Besides mid-term goals,
bug reports and requests we cannot x or honor right away are being gathered here. If you
have some time for Emacs Lisp hacking, you are encouraged to try to provide a solution
to one of the following problems. If you dont know Lisp, you may help us to improve the
documentation. It might be a good idea to discuss proposed changes on the mailing list of
AUCT
E
X rst.
A.3.1 Mid-term Goals
Integration of preview-latex into AUCT
E
X
As of AUCT
E
X 11.81 preview-latex is a part of AUCT
E
X in the sense that the installation
routines were merged and preview-latex is being packaged with AUCT
E
X.
Further integration will happen at the backend. This involves folding of error parsing
and task management of both packages which will ease development eorts and avoid
redundant work.
More exible option and command handling
The current state of command handling with TeX-command-list is not very exible
because there is no distinction between executables and command line options to be
passed to them.
Customization of TeX-command-list by the user will interfere with updates of
AUCT
E
X.
Error help catalogs
Currently, the help for errors is more or less hardwired into tex.el. For supporting
error help in other languages, it would be sensible to instead arrange error messages
in language-specic les, make a common info le from all such catalogs in a given
language and look the error texts up in an appropriate index. The user would then
specify a preference list of languages, and the errors would be looked up in the catalogs
in sequence until they were identied.
Combining docTeX with RefTeX
Macro cross references should also be usable for document navigation using RefTeX.
A.3.2 Wishlist
Documentation lookup for macros
A parser could gather information about which macros are dened in which L
a
T
E
X
packages and store the information in a hashtable which can be used in a backend
for TeX-doc in order to open the matching documentation for a given macro. The
information could also be used to insert an appropriate \usepackage statement if the
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 89
user tries to insert a macro for which the respective package has not been requested
yet.
Spell checking of macros
A special ispell dictionary for macros could be nice to have.
Quick error overviews
An error overview window (extract from the log le with just the error lines, clickable
like a grep buer) and/or fringe indicators for errors in the main text would be nice.
A math entry grid
A separate frame with a table of math character graphics to click on in order to insert
the respective sequence into the buer (cf. the grid of x-symbol).
Crossreferencing support
It would be nice if you could index process your favorite collection of .dtx les (such
as the LaTeX source), just call a command on arbitrary control sequence, and get either
the DVI viewer opened right at the denition of that macro (using Source Specials),
or the source code of the .dtx le.
Better plain TeX support
For starters, LaTeX-math-mode is not very L
a
T
E
X-specic in the rst place, and similar
holds for indentation and formatting.
Poor mans Source Specials In particular in PDF mode (and where Source Specials
cause problems), alternatives would be desirable. One could implement inverse search
by something like Heiko Oberdieks vpe.sty, and forward search by using the .aux
le info to correlate labels in the text (possibly in cooperation with RefT
E
X) with
previewer pages.
In AUCT
E
X 11.83, support for forward search with PDF les was added. Currently
this only works if you use the pdfsync L
a
T
E
X package and xpdf as your PDF viewer.
See Section 4.2 [Viewing], page 49.
Page count when compiling should (optionally) go to modeline of the window where
the compilation command was invoked, instead of the output window. Suggested by
Karsten Tinnefeld <[email protected]>.
Command to insert a macrodenition in the preamble, without moving point from the
current location. Suggested by "Jerey C. Ely" <[email protected]>.
A database of all commands dened in all styleles. When a command or environment
gets entered that is provided in one of the styles, insert the appropriate \usepackage
in the preamble.
A way to add and overwrite math mode entries in style les, and to decide where they
should be. Suggested by Remo Badii <[email protected]>.
Create template for (rst) line of tabular environment.
I think prompting for the master is the intended behaviour. It corresponds to a shared
value for TeX-master.
There should probably be a none value which wouldnt query for the master, but
instead disable all features that relies on TeX-master.
This default value for TeX-master could then be controled with mapping based on the
extension.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 90
Multiple argument completion for \bibliography. In general, I ought to make ,
special for these kind of completions.
Suggest makeindex when appropriate.
Use index les (when available) to speed up C-c C-m include RET.
Option not to calculate very slow completions like for C-c C-m include RET.
Font menu should be created from TeX-font-list.
Installation procedure written purely in emacs lisp.
Included PostScript les should also be counted as part of the document.
A nice hierarchical by-topic organization of all ocially documented LaTeX macros,
available from the menu bar.
TeX-command-default should be set from the master le, if not set locally. Suggested
by Peter Whaite <[email protected]>.
Make AUCT
E
X work with crypt++. Suggested by Chris Moore
<[email protected]>.
Make AUCT
E
X work with longlines. This would also apply to preview-latex, though
it might make sense to unify error processing before attempting this.
The Spell command should apply to all les in a document. Maybe it could try to
restrict to les that have been modied since last spell check? Suggested by Ravinder
Bhumbla <[email protected]>.
Make . check for abbreviations and sentences ending with capital letters.
Use Emacs 19 minibuer history to choose between previewers, and other stu. Sug-
gested by John Interrante <[email protected]>.
Make features.
A new command TeX-update (C-c C-u) could be used to create an up-to-date dvi le
by repeatedly running BibT
E
X, MakeIndex and (La)T
E
X, until an error occurs or we
are done.
An alternative is to have an Update command that ensures the dvi le is up to date.
This could be called before printing and previewing.
Documentation of variables that can be set in a style hook.
We need a list of what can safely be done in an ordinary style hook. You can not set a
variable that AUCT
E
X depends on, unless AUCT
E
X knows that it has to run the style
hooks rst.
Here is the start of such a list.
LaTeX-add-environments
TeX-add-symbols
LaTeX-add-labels
LaTeX-add-bibliographies
LaTeX-largest-level
Completion for counters and sboxes.
Outline should be (better) supported in T
E
X mode.
At least, support headers, trailers, as well as TeX-outline-extra.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 91
TeX-header-start and TeX-trailer-end.
We might want these, just for fun (and outlines)
Plain T
E
X and L
a
T
E
X specic header and trailer expressions.
We should have a way to globally specify the default value of the header and trailer
regexps.
Get closer to original TeX-mode keybindings.
A third initialization le (tex-mode.el) containing an emulator of the standard TeX-
mode would help convince some people to change to AUCT
E
X.
Make TeX-next-error parse ahead and store the results in a list, using markers to
remember buer positions in order to be more robust with regard to line numbers and
changed les. This is what next-error does. (Or did, until Emacs 19).
Finish the Texinfo mode. For one thing, many Texinfo mode commands do not accept
braces around their arguments.
Hook up the letter environment with bbdb.el.
A.3.3 Bugs
The parsed les and style hooks for example.dtx, example.sty, example.drv and
example.bib all clash. Bad.
C-c should always stay in the current window, also when it nds a new le.
Do not overwrite emacs warnings about existing auto-save les when loading a new
le.
Maybe the regexp for matching a TeX symbol during parsing should be
"\\\\\\([a-zA-Z]+\\|.\\)" <[email protected]> Pe-
ter Thiemann.
AUCT
E
X should not parse verbatim environments.
Make check for math context in LaTeX-math-mode. and simply self insert if not in
a math context.
Make TeX-insert-dollar more robust. Currently it can be fooled by \mboxes and
escaped double dollar for example.
Correct indentation for tabular, tabbing, table, math, and array environments.
No syntactic font locking of verbatim macros and environments. (XEmacs only)
Font locking inside of verbatim macros and environments is not inhibited. This may
result in syntax highlighting of unbalanced dollar signs and the like spilling out of the
verbatim content. (XEmacs only)
Folding of L
a
T
E
X constructs spanning more than one line may result in overfull lines.
(XEmacs only)
A.4 Frequently Asked Questions
1. Something is not working correctly. What should I do?
Well, you might have guessed it, the rst place to look is in the available documentation
packaged with AUCT
E
X. This could be the release notes (in the RELEASE le) or the
news section of the manual in case you are experiencing problems after an upgrade,
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 92
the INSTALL le in case you are having problems with the installation, the section
about bugs in the manual in case you encountered a bug or the relevant sections in the
manual for other related problems.
If this did not help, you can send a bug report to the AUCT
E
X bug reporting list by
using the command M-x TeX-submit-bug-report RET. But before you do this, you
can try to get more information about the problem at hand which might also help you
locate the cause of the error yourself.
First, you can try to generate a so-called backtrace which shows the functions involved
in a program error. In order to do this, start Emacs with the command line emacs
--debug-init and/or put the line
(setq debug-on-error t)
as the rst line into your init le. XEmacs users might want to add (setq stack-
trace-on-error t) as well. After Emacs has started, you can load a le which triggers
the error and a new window should pop up showing the backtrace. If you get such a
backtrace, please include it in the bug report.
Second, you can try to gure out if something in your personal or site conguration
triggers the error by starting Emacs without such customizations. You can do this by
invoking Emacs with the command line emacs -q -no-site-file -l auctex. The
-l option auctex.el which you normally do in your init le. After you have started
Emacs like this, you can load the le triggering the error. If everything is working now,
you know that you have to search either in the site conguration le or your personal
init le for statements related to the problem.
2. What versions of Emacs and XEmacs are supported?
AUCT
E
X was tested with Emacs 21 and XEmacs 21.4.15. Older versions may work but
are unsupported. Older versions of XEmacs might possibly made to work by updating
the xemacs-base package through the XEmacs package system. If you are looking
for a recommendation, it would appear that the smoothest working platform on all
operating systems at the current point of time would be Emacs 22 or higher.
Our success with XEmacs has been less than convincing. Code for core functionality
like formatting and syntax highlighting tends to be dierent and often older than
even Emacs 21.4, and Unicode support as delivered is problematic at best, missing
on Windows. Both AUCT
E
X and XEmacs developers dont hear much from active
users of the combination. Partly for that reason, problems tend to go unnoticed for
long amounts of time and are often found, if at all, after releases. No experiences or
recommendations can be given for beta or developer versions of XEmacs.
3. What should I do when ./configure does not nd programs like latex?
This is problem often encountered on Windows. Make sure that the PATH environ-
ment variable includes the directories containing the relevant programs, as described
in Section Installation under MS Windows in the AUCT
E
X manual.
4. Why doesnt the completion, style le, or multi-le stu work?
It must be enabled rst, insert this in your init le:
(setq-default TeX-master nil)
(setq TeX-parse-self t)
(setq TeX-auto-save t)
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 93
Read also the chapters about parsing and multile documents in the manual.
5. Why doesnt TeX-save-document work?
TeX-check-path has to contain "./" somewhere.
6. Why is the information in foo.tex forgotten when I save foo.bib?
For various reasons, AUCT
E
X ignores the extension when it stores information about
a le, so you should use unique base names for your les. E.g. rename foo.bib to
foob.bib.
7. Why doesnt AUCT
E
X signal when processing a document is done?
If the message in the minibuer stays "Type C-c C-l to display results of compilation.",
you probably have a misconguration in your init le (.emacs, init.el or similar).
To track this down either search in the *Messages* buer for an error message or put
(setq debug-on-error t) as the rst line into your init le, restart Emacs and open
a L
a
T
E
X le. Emacs will complain loudly by opening a debugging buer as soon as an
error occurs. The information in the debugging buer can help you nd the cause of
the error in your init le.
8. Why does TeX-next-error (C-c ) fail?
When writing the log le, T
E
X puts information related to a le, including error mes-
sages, between a pair of parentheses. AUCT
E
X determines the le where the error
happened by parsing the log le and counting the parentheses. This can fail when
there are other, unbalanced parentheses present.
As a workaround you can activate so-called le:line:error messages for the log le.
(Those are are easier to parse, but may lack some details.) Either you do this in the
conguration of your T
E
X system (consult its manual to see where this is) or you add
a command line switch to the (la)tex call, e.g. by customizing LaTeX-command-style
or TeX-command-list.
9. What does AUC stand for?
AUCT
E
X came into being at Aalborg University in Denmark. Back then the Danish
name of the university was Aalborg Universitetscenter; AUC for short.
A.5 Features specic to AUCT
E
Xs Texinfo major mode
AUCT
E
X includes a major mode for editting Texinfo les. This major mode is not the same
mode as the native Texinfo mode (see undened [(texinfo) Texinfo Mode], page unde-
ned) of Emacs, although they have the same name. However, AUCT
E
X still relies on a
number of functions from the native Texinfo mode.
The following text describes which functionality is oered by AUCT
E
X and which by
the native Texinfo mode. This should enable you to decide when to consult the AUCT
E
X
manual and when the manual of the native mode. And in case you are a seasoned user of the
native mode, the information should help you to swiftly get to know the AUCT
E
X-specic
commands.
A.5.1 How AUCT
E
X and the native mode work together
In a nutshell the split between AUCT
E
X Texinfo mode, and native Texinfo mode is as
follows:
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 94
Most of the editing (environment creation, commenting, font command insertions)
and/or processing commands (e.g. compiling or printing) which are available in other
AUCT
E
X modes are also handled by AUCT
E
X in Texinfo mode.
Texinfo-related features (e.g. info node linkage or menu creation) rely on the commands
provided by the native Texinfo mode. AUCT
E
X provides the key bindings to reach these
functions, keeping the same keys as in native Texinfo whenever possible, or similar ones
otherwise.
A.5.2 Where the native mode is superseded
This section is directed to users of the native Texinfo mode switching to AUCT
E
X. It
follows the summary of the native mode (see undened [(texinfo) Texinfo Mode Summary],
page undened) and lists which of its commands are no longer of use.
Insert commands
In the native Texinfo mode, frequently used Texinfo commands can be inserted
with key bindings of the form C-c C-c k where k diers for each Texinfo com-
mand; c inserts @code, d inserts @dfn, k @kbd, etc.
In AUCT
E
X commands are inserted with the key binding C-c C-m instead which
prompts for the macro to be inserted. For font selection commands (like @b, @i,
or @emph) and a few related ones (like @var, @key or @code) there are bindings
which insert the respective macros directly. They have the form C-c C-f k or
C-c C-f C-k and call the function TeX-font. Type C-c C-f RET to get a list of
supported commands.
Note that the prex argument is not handled the same way by AUCT
E
X. Note
also that the node insertion command from the native mode (texinfo-insert-
@node) can still accessed from the Texinfo menu in AUCT
E
X.
Insert braces
In AUCT
E
X braces can be inserted with the same key binding as in the native
Texinfo mode: C-c {. But AUCT
E
X uses its own function for the feature:
TeX-insert-braces.
Insert environments
The native Texinfo mode does not insert full environments. Instead, it provides
the function texinfo-insert-@end (mapped to C-c C-c e) for closing an open
environment with a matching @end statement.
In AUCT
E
X you can insert full environments, i.e. both the opening and closing
statements, with the function Texinfo-environment (mapped to C-c C-e).
Format info les with makeinfo and T
E
X
In the native Texinfo mode there are various functions and bindings to format a
region or the whole buer for info or to typeset the respective text. For example,
there is makeinfo-buffer (mapped to C-c C-m C-b) which runs makeinfo on
the buer or there is texinfo-tex-buffer (mapped to C-c C-t C-b) which
runs T
E
X on the buer in order to produce a DVI le.
In AUCT
E
X dierent commands for formatting or typesetting can be invoked
through the function TeX-command-master (mapped to C-c C-c). After typing
C-c C-c, you can select the desired command, e.g Makeinfo or TeX, through
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 95
a prompt in the mini buer. Note that you can make, say Makeinfo, the
default by adding this statement in your init le:
(add-hook Texinfo-mode-hook
(lambda () (setq TeX-command-default "Makeinfo")))
Note also that C-c C-c Makeinfo RET is not completely functionally equivalent
to makeinfo-buffer as the latter will display the resulting info le in Emacs,
showing the node corresponding to the position in the source le, just after a
successful compilation. This is why, while using AUCT
E
X, invoking makeinfo-
buffer might still be more convenient.
Note also that in the case of a multile document, C-c C-c in AUCT
E
X will
work on the whole document (provided that the le variable TeX-master is set
correctly), while makeinfo-buffer in the native mode will process only the
current buer, provided at the @setfilename statement is provided.
Produce indexes and print
The native Texinfo mode provides the binding C-c C-t C-i (texinfo-
texindex) for producing an index and the bindings C-c C-t C-p (texinfo-
tex-print) and C-c C-t C-q (tex-show-print-queue) for printing and show-
ing the printer queue. These are superseded by the respective commands avail-
able through C-c C-c (TeX-command-master) in AUCT
E
X: Index, Print, and
Queue.
Kill jobs The command C-c C-t C-k (tex-kill-job) in the native mode is superseded
by C-c C-k (TeX-kill-job) in AUCT
E
X.
A.5.3 Where key bindings are mapped to the native mode
This node follows the native Texinfo mode summary (see undened [(texinfo) Texinfo
Mode Summary], page undened) and lists only those commands to which AUCT
E
X
provides a keybinding.
Basically all commands of the native mode related to producing menus and interlinking
nodes are mapped to same or similar keys in AUCT
E
X, while a few insertion commands are
mapped to AUCT
E
X-like keys.
@item insertion
The binding C-c C-c i for the insertion of @item in the native mode is mapped
to M-RET or C-c C-j in AUCT
E
X, similar to other AUCT
E
X modes.
@end insertion
The binding C-c C-c e for closing a @foo command by a corresponding @end
foo statement in the native mode is mapped to C-c C-] in AUCT
E
X, similar
to other AUCT
E
X modes.
Move out of balanced braces
The binding C-} (up-list) is available both in the native mode and in
AUCT
E
X. (This is because the command is not implemented in either mode
but a native Emacs command.) However, in AUCT
E
X, you cannot use C-] for
this, as it is used for @end insertion.
Appendix A: Copying, Changes, Development, FAQ, Texinfo Mode 96
Update pointers
The bindings C-c C-u C-n (texinfo-update-node) and C-c C-
u C-e (texinfo-every-node-update) from the native mode are available in
AUCT
E
X as well.
Update menus
The bindings C-c C-u m (texinfo-master-menu), C-c C-u C-m (texinfo-
make-menu), and C-c C-u C-a (texinfo-all-menus-update) from the native
mode are available in AUCT
E
X as well. The command texinfo-start-menu-
description, bound to C-c C-c C-d in the native mode, is bound to C-c C-u
C-d in AUCT
E
X instead.
A.5.4 Which native mode key bindings are missing
The following commands from the native commands might still be useful when working
with AUCT
E
X, however, they are not accessible with a key binding any longer.
@node insertion
The node insertion command, mapped to C-c C-c n in the native mode, is not
mapped to any key in AUCT
E
X. You can still access it through the Texinfo
menu, though. Another alternative is to use the C-c C-m binding for macro
insertion in AUCT
E
X.
Show the section structure
The command texinfo-show-structure (C-c C-s) from the native mode does
not have a key binding in AUCT
E
X. The binding is used by AUCT
E
X for
sectioning.
Indices 97
Indices
Key Index
"
" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
$
$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
C
C-c %. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
C-c *. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
C-c .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
C-c ;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
C-c ?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
C-c ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
C-c ^. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
C-c _. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
C-c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
C-c {. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
C-c ~. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
C-c C-b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
C-c C-c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
C-c C-d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
C-c C-e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
C-c C-f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
C-c C-f C-b. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 21
C-c C-f C-c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
C-c C-f C-e. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 21
C-c C-f C-f. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
C-c C-f C-i. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 21
C-c C-f C-r. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 21
C-c C-f C-s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 21
C-c C-f C-t. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
C-c C-k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
C-c C-l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
C-c C-m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
C-c C-n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
C-c C-o b. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o C-b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
C-c C-o C-c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o C-e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o C-f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
C-c C-o C-m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o C-o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
C-c C-o C-p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o C-r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o i. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o p. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-o r. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
C-c C-q C-e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
C-c C-q C-p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
C-c C-q C-r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
C-c C-q C-s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
C-c C-r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
C-c C-s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
C-c C-t C-b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
C-c C-t C-i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
C-c C-t C-p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
C-c C-t C-r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
C-c C-t C-s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
C-c C-t C-w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
C-c C-v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
C-c LFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
C-j. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
L
LFD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
M
M-C-h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
M-q. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
M-TAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
T
TAB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Indices 98
Function Index
L
LaTeX-add-bibliographies . . . . . . . . . . . . . . . . . . . 69
LaTeX-add-environments. . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-add-labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
LaTeX-close-environment. . . . . . . . . . . . . . . . . . . . . 25
LaTeX-env-args . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-bib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-contents . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-figure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-label. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-minipage . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-picture. . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-env-tabular* . . . . . . . . . . . . . . . . . . . . . . . . . . 68
LaTeX-environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
LaTeX-fill-environment. . . . . . . . . . . . . . . . . . . . . . 33
LaTeX-fill-paragraph . . . . . . . . . . . . . . . . . . . . . . . . 33
LaTeX-fill-region. . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
LaTeX-fill-section . . . . . . . . . . . . . . . . . . . . . . . . . . 33
LaTeX-indent-line. . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
LaTeX-insert-environment . . . . . . . . . . . . . . . . . . . 68
LaTeX-insert-item. . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
LaTeX-mark-environment. . . . . . . . . . . . . . . . . . . . . . 29
LaTeX-mark-section . . . . . . . . . . . . . . . . . . . . . . . . . . 29
LaTeX-math-mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
LaTeX-section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
LaTeX-section-heading . . . . . . . . . . . . . . . . . . . . . . . 23
LaTeX-section-label . . . . . . . . . . . . . . . . . . . . . . . . . 23
LaTeX-section-section . . . . . . . . . . . . . . . . . . . . . . . 23
LaTeX-section-title . . . . . . . . . . . . . . . . . . . . . . . . . 23
LaTeX-section-toc. . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
T
TeX-add-style-hook . . . . . . . . . . . . . . . . . . . . . . . . . . 64
TeX-add-symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
TeX-arg-cite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-conditional . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-coordinate . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-corner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-counter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-define-cite . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-define-counter. . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-define-environment . . . . . . . . . . . . . . . . . 66
TeX-arg-define-label . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-define-macro . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-define-savebox. . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-environment . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-eval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-input-file . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-lr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-pagestyle. . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-savebox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TeX-arg-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-tb. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-arg-verb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TeX-auto-generate. . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TeX-clean. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
TeX-command-buffer . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TeX-command-master . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TeX-command-region . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TeX-comment-or-uncomment-paragraph . . . . . . . . 30
TeX-comment-or-uncomment-region . . . . . . . . . . . 30
TeX-complete-symbol . . . . . . . . . . . . . . . . . . . . . . . . . 27
TeX-doc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
TeX-electric-macro . . . . . . . . . . . . . . . . . . . . . . . . . . 28
TeX-fold-buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
TeX-fold-clearout-buffer . . . . . . . . . . . . . . . . . . . 42
TeX-fold-clearout-item. . . . . . . . . . . . . . . . . . . . . . 42
TeX-fold-clearout-paragraph . . . . . . . . . . . . . . . . 42
TeX-fold-clearout-region . . . . . . . . . . . . . . . . . . . 42
TeX-fold-comment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TeX-fold-dwim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
TeX-fold-env . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TeX-fold-macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TeX-fold-math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TeX-fold-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
TeX-fold-paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TeX-fold-region. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TeX-font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
TeX-header-end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
TeX-home-buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
TeX-insert-braces. . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
TeX-insert-dollar. . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
TeX-insert-macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
TeX-insert-quote. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
TeX-interactive-mode . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-kill-job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
TeX-master-file-ask . . . . . . . . . . . . . . . . . . . . . . . . . 55
TeX-next-error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
TeX-normal-mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TeX-PDF-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-pin-region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
TeX-recenter-output-buffer . . . . . . . . . . . . . . . . . 52
TeX-save-document. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
TeX-source-correlate-mode. . . . . . . . . . . . . . . 48, 51
TeX-toggle-debug-bad-boxes . . . . . . . . . . . . . . . . . 52
TeX-toggle-debug-warnings . . . . . . . . . . . . . . . . . . 52
TeX-view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49, 51
Texinfo-mark-environment . . . . . . . . . . . . . . . . . . . 29
Texinfo-mark-node. . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Texinfo-mark-section . . . . . . . . . . . . . . . . . . . . . . . . 29
Indices 99
Variable Index
C
ConTeXt-clean-intermediate-suffixes . . . . . . . 53
ConTeXt-clean-output-suffixes. . . . . . . . . . . . . . 53
ConTeXt-engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
ConTeXt-Omega-engine . . . . . . . . . . . . . . . . . . . . . . . . 48
D
docTeX-clean-intermediate-suffixes . . . . . . . . 53
docTeX-clean-output-suffixes . . . . . . . . . . . . . . . 53
F
font-latex-deactivated-keyword-classes . . . 38
font-latex-fontify-script . . . . . . . . . . . . . . . . . . 40
font-latex-fontify-sectioning. . . . . . . . . . . . . . 37
font-latex-match-bold-command-keywords . . . 37
font-latex-match-bold-declaration-keywords
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
font-latex-match-function-keywords . . . . . . . . 36
font-latex-match-italic-command-keywords
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
font-latex-match-italic-declaration-
keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
font-latex-match-math-command-keywords. . . 37,
39
font-latex-match-reference-keywords . . . . . . . 36
font-latex-match-sectioning-0-keywords . . . 37
font-latex-match-sectioning-1-keywords . . . 37
font-latex-match-sectioning-2-keywords . . . 37
font-latex-match-sectioning-3-keywords . . . 37
font-latex-match-sectioning-4-keywords . . . 37
font-latex-match-sectioning-5-keywords . . . 37
font-latex-match-slide-title-keywords. . . . . 37
font-latex-match-textual-keywords . . . . . . . . . 36
font-latex-match-type-command-keywords . . . 37
font-latex-match-type-declaration-keywords
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
font-latex-match-variable-keywords . . . . . . . . 36
font-latex-match-warning-keywords . . . . . . . . . 36
font-latex-math-environments . . . . . . . . . . . . . . . 39
font-latex-quotes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
font-latex-script-display . . . . . . . . . . . . . . . . . . 40
font-latex-sectioning-0-face . . . . . . . . . . . . . . . 37
font-latex-sectioning-1-face . . . . . . . . . . . . . . . 37
font-latex-sectioning-2-face . . . . . . . . . . . . . . . 37
font-latex-sectioning-3-face . . . . . . . . . . . . . . . 37
font-latex-sectioning-4-face . . . . . . . . . . . . . . . 37
font-latex-sectioning-5-face . . . . . . . . . . . . . . . 37
font-latex-slide-title-face . . . . . . . . . . . . . . . . 37
font-latex-user-keyword-classes . . . . . . . . . . . 39
J
japanese-LaTeX-command-default . . . . . . . . . 60, 61
japanese-LaTeX-default-style . . . . . . . . . . . 60, 61
japanese-TeX-command-default . . . . . . . . . . . 60, 61
L
LaTeX-amsmath-label . . . . . . . . . . . . . . . . . . . . . . . . . 25
LaTeX-auto-label-regexp-list . . . . . . . . . . . . . . . 57
LaTeX-auto-minimal-regexp-list. . . . . . . . . . . . . 57
LaTeX-auto-regexp-list. . . . . . . . . . . . . . . . . . . . . . 57
LaTeX-babel-hyphen . . . . . . . . . . . . . . . . . . . . . . . . . . 60
LaTeX-babel-hyphen-after-hyphen . . . . . . . . . . . 60
LaTeX-babel-hyphen-language-alist . . . . . . . . . 60
LaTeX-biblatex-use-Biber . . . . . . . . . . . . . . . . . . . 47
LaTeX-clean-intermediate-suffixes . . . . . . . . . 53
LaTeX-clean-output-suffixes . . . . . . . . . . . . . . . . 53
LaTeX-command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
LaTeX-csquotes-close-quote . . . . . . . . . . . . . . . . . 20
LaTeX-csquotes-open-quote . . . . . . . . . . . . . . . . . . 20
LaTeX-csquotes-quote-after-quote . . . . . . . . . . 20
LaTeX-default-environment . . . . . . . . . . . . . . . . . . 24
LaTeX-default-format . . . . . . . . . . . . . . . . . . . . . . . . 26
LaTeX-default-position. . . . . . . . . . . . . . . . . . . . . . 26
LaTeX-enable-toolbar . . . . . . . . . . . . . . . . . . . . . . . . 45
LaTeX-eqnarray-label . . . . . . . . . . . . . . . . . . . . . . . . 25
LaTeX-equation-label . . . . . . . . . . . . . . . . . . . . . . . . 25
LaTeX-figure-label . . . . . . . . . . . . . . . . . . . . . . . . . . 25
LaTeX-fill-break-at-separators. . . . . . . . . . . . . 33
LaTeX-fill-break-before-code-comments. . . . . 34
LaTeX-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
LaTeX-fold-env-spec-list . . . . . . . . . . . . . . . . . . . 43
LaTeX-fold-macro-spec-list . . . . . . . . . . . . . . . . . 43
LaTeX-fold-math-spec-list . . . . . . . . . . . . . . . . . . 43
LaTeX-font-list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
LaTeX-indent-environment-check. . . . . . . . . . . . . 31
LaTeX-indent-environment-list. . . . . . . . . . . . . . 31
LaTeX-indent-level. . . . . . . . . . . . . . . . . . . . . . . 30, 31
LaTeX-item-indent . . . . . . . . . . . . . . . . . . . . . . . . 30, 32
LaTeX-item-regexp. . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
LaTeX-math-abbrev-prefix . . . . . . . . . . . . . . . . . . . 27
LaTeX-math-list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
LaTeX-math-menu-unicode. . . . . . . . . . . . . . . . . . . . . 27
LaTeX-Omega-command . . . . . . . . . . . . . . . . . . . . . . . . . 48
LaTeX-paragraph-commands . . . . . . . . . . . . . . . . . . . 33
LaTeX-section-hook . . . . . . . . . . . . . . . . . . . . . . . . . . 23
LaTeX-section-label. . . . . . . . . . . . . . . . . . . . . . 23, 24
LaTeX-syntactic-comments . . . . . . . . . . . . . . . . 31, 32
LaTeX-table-label . . . . . . . . . . . . . . . . . . . . . . . . 25, 26
LaTeX-top-caption-list . . . . . . . . . . . . . . . . . . 25, 26
LaTeX-verbatim-environments . . . . . . . . . . . . . . . . 40
LaTeX-verbatim-macros-with-braces . . . . . . . . . 40
LaTeX-verbatim-macros-with-delims . . . . . . . . . 40
P
plain-TeX-auto-regexp-list . . . . . . . . . . . . . . . . . 57
Indices 100
plain-TeX-clean-intermediate-suffixes. . . . . 53
plain-TeX-clean-output-suffixes . . . . . . . . . . . 53
plain-TeX-enable-toolbar . . . . . . . . . . . . . . . . . . . 45
T
TeX-arg-input-file-search . . . . . . . . . . . . . . . . . . 66
TeX-auto-cleanup-hook . . . . . . . . . . . . . . . . . . . . . . . 71
TeX-auto-empty-regexp-list . . . . . . . . . . . . . . . . . 57
TeX-auto-full-regexp-list . . . . . . . . . . . . . . . . . . 57
TeX-auto-global. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TeX-auto-local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TeX-auto-parse-length . . . . . . . . . . . . . . . . . . . . . . . 57
TeX-auto-prepare-hook . . . . . . . . . . . . . . . . . . . . . . . 70
TeX-auto-private. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TeX-auto-regexp-list . . . . . . . . . . . . . . . . . . . . 57, 70
TeX-auto-save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TeX-auto-untabify. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TeX-brace-indent-level. . . . . . . . . . . . . . . . . . . . . . 32
TeX-check-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-clean-confirm. . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
TeX-close-quote. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
TeX-command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
TeX-command-default . . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-command-list . . . . . . . . . . . . . . . . . . . . . . . . . 45, 46
TeX-default-macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
TeX-default-mode . . . . . . . . . . . . . . . . . . . . . . . . . 60, 61
TeX-display-help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
TeX-DVI-via-PDFTeX . . . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-electric-escape . . . . . . . . . . . . . . . . . . . . . . . . . 28
TeX-electric-sub-and-superscript . . . . . . . . . . 27
TeX-engine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
TeX-engine-alist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
TeX-engine-alist-builtin . . . . . . . . . . . . . . . . . . . 48
TeX-expand-list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
TeX-file-recurse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TeX-fold-command-prefix. . . . . . . . . . . . . . . . . . . . . 43
TeX-fold-env-spec-list. . . . . . . . . . . . . . . . . . . . . . 43
TeX-fold-force-fontify. . . . . . . . . . . . . . . . . . . . . . 41
TeX-fold-help-echo-max-length. . . . . . . . . . . . . . 44
TeX-fold-macro-spec-list . . . . . . . . . . . . . . . . . . . 43
TeX-fold-math-spec-list. . . . . . . . . . . . . . . . . . . . . 43
TeX-fold-preserve-comments . . . . . . . . . . . . . . . . . 42
TeX-fold-type-list . . . . . . . . . . . . . . . . . . . . . . . . . . 41
TeX-fold-unspec-env-display-string . . . . . . . . 44
TeX-fold-unspec-macro-display-string. . . . . . 44
TeX-fold-unspec-use-name . . . . . . . . . . . . . . . . . . . 44
TeX-font-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
TeX-header-end . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 46
TeX-ignore-file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TeX-insert-braces. . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
TeX-insert-macro-default-style. . . . . . . . . . . . . 28
TeX-install-font-lock . . . . . . . . . . . . . . . . . . . . . . . 35
TeX-interactive-mode . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-language-bg-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-cz-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-de-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-dk-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-is-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-it-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-nl-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-pl-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-sk-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-language-sv-hook . . . . . . . . . . . . . . . . . . . . . . . . 59
TeX-macro-global . . . . . . . . . . . . . . . . . . . . . . . . . 15, 62
TeX-macro-private. . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TeX-master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 55
TeX-math-close-double-dollar . . . . . . . . . . . . . . . 21
TeX-newline-function . . . . . . . . . . . . . . . . . . . . 30, 32
TeX-Omega-command. . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
TeX-one-master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
TeX-open-quote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
TeX-outline-extra. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
TeX-output-view-style . . . . . . . . . . . . . . . . . . . . . . . 50
TeX-parse-self . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TeX-PDF-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
TeX-quote-after-quote . . . . . . . . . . . . . . . . . . . . . . . 20
TeX-quote-language-alist . . . . . . . . . . . . . . . . . . . 60
TeX-region. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TeX-save-query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TeX-show-compilation . . . . . . . . . . . . . . . . . . . . . . . . 49
TeX-source-correlate-method . . . . . . . . . . . . . . . . 48
TeX-source-correlate-mode . . . . . . . . . . . . . . . . . . 48
TeX-source-correlate-start-server . . . . . . . . . 51
TeX-style-global. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
TeX-style-local. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TeX-style-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
TeX-style-private. . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TeX-trailer-start . . . . . . . . . . . . . . . . . . . . . . . . 45, 46
TeX-view-predicate-list. . . . . . . . . . . . . . . . . . . . . 50
TeX-view-program-list . . . . . . . . . . . . . . . . . . . . . . . 50
TeX-view-program-selection . . . . . . . . . . . . . . . . . 49
TeX-view-style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Texinfo-clean-intermediate-suffixes . . . . . . . 53
Texinfo-clean-output-suffixes. . . . . . . . . . . . . . 53
Concept Index
.
.emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
\
\begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
\chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22
\cite, completion of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
\emph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 21
Indices 101
\end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
\include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
\input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
\item. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
\label. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22
\label, completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
\ref, completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
\section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22
\subsection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22
\textbf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 21
\textit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 21
\textrm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 21
\textsc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
\textsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
\textsl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 21
\texttt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
A
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Adding a style hook . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Adding bibliographies . . . . . . . . . . . . . . . . . . . . . . . . . 69
Adding environments . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Adding labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Adding macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Adding other information. . . . . . . . . . . . . . . . . . . . . . 69
Adding to PATH in Windows . . . . . . . . . . . . . . . . . . . 11
amsmath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
ANSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Arguments to TeX macros . . . . . . . . . . . . . . . . . . . . . 27
ASCII pTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58, 60
auctex.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 81
auto directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Auto-Reveal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Automatic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Automatic Customization. . . . . . . . . . . . . . . . . . . . . . 61
Automatic Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Automatic updating style hooks . . . . . . . . . . . . . . . 63
B
Bad boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Biber. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
biblatex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Bibliographies, adding . . . . . . . . . . . . . . . . . . . . . . . . . 69
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
bibliography, completion. . . . . . . . . . . . . . . . . . . . . . . 28
BibTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
BibTeX, completion . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
book.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Braces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Brackets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Bulgarian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
C
Changing font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Changing the parser . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Chapters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22
Character set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
ChinaTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
chktex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
citations, completion of . . . . . . . . . . . . . . . . . . . . . . . . 28
cite, completion of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
CJK language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
CJK-LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Cleaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Completion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Controlling the output . . . . . . . . . . . . . . . . . . . . . . . . . 52
Copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
CTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Current le. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Customization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Customization, personal . . . . . . . . . . . . . . . . . . . . . . . 15
Customization, site . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Czech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
D
Danish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Default command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Dening bibliographies in style hooks . . . . . . . . . . 69
Dening environments in style hooks . . . . . . . . . . . 67
Dening labels in style hooks . . . . . . . . . . . . . . . . . . 69
Dening macros in style hooks . . . . . . . . . . . . . . . . . 64
Dening other information in style hooks . . . . . . 69
Deleting fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 22
Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Display math mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Documents with multiple les. . . . . . . . . . . . . . . . . . 54
Dollar signs, color bleed with . . . . . . . . . . . . . . . . . . 40
Dollars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Double quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Dutch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
E
Enumerates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Environments, adding . . . . . . . . . . . . . . . . . . . . . . . . . 67
Eqnarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Europe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
European Characters . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Example of a style le. . . . . . . . . . . . . . . . . . . . . . . . . . 63
Expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
External Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Indices 102
Extracting TeX symbols . . . . . . . . . . . . . . . . . . . . . . . 61
F
Faces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
FDL, GNU Free Documentation License . . . . . . . 72
Figure environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Filling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Finding errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Finding the current le . . . . . . . . . . . . . . . . . . . . . . . . 52
Finding the master le. . . . . . . . . . . . . . . . . . . . . . . . . 52
Floats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40, 44
Font Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Font macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
font-latex. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Formatting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 32, 45
Forward search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Free software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
G
General Public License. . . . . . . . . . . . . . . . . . . . . . . . . . 2
Generating symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
German . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Global directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Global macro directory . . . . . . . . . . . . . . . . . . . . . . . . 62
Global style hook directory . . . . . . . . . . . . . . . . . . . . 62
Global TeX macro directory . . . . . . . . . . . . . . . . . . . 62
GPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
H
Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Hide Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
HLaTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
I
I/O correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 51
Including . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Indentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Indenting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Indexing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Inputing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Internationalization. . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Inverse search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
ISO 8859 Latin 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
ISO 8859 Latin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
iso-cvt.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
ispell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Italian. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Itemize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
J
Japan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Japanese . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
jLaTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
jTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58, 60
K
Killing a process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
kTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
L
Label prex. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 25
Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 25
Labels, adding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
labels, completion of . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
lacheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Language Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Latin 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Latin 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Local style directory . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Local style hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
M
Macro arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Macro completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Macro expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
macro.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
macro.tex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Macros, adding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
makeindex. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Making a bibliography. . . . . . . . . . . . . . . . . . . . . . . . . 45
Making an index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Many Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Master le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52, 54
Matching dollar signs . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Math mode delimiters . . . . . . . . . . . . . . . . . . . . . . . . . 20
Math, fontication of . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Math, fontication problems with. . . . . . . . . . . . . . 40
Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
MULE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58, 60
MULE-UCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Multile Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Multiple Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
N
National letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Indices 103
Next error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Nippon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
NTT jTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58, 60
O
Other information, adding . . . . . . . . . . . . . . . . . . . . . 69
Outlining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40, 44
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Overfull boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
P
Parsing errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Parsing LaTeX errors . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Parsing new macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Parsing TeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56, 61
Parsing TeX output . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
PATH in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
PDF mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
PDFSync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 51
Personal customization . . . . . . . . . . . . . . . . . . . . . . . . 15
Personal information . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Personal macro directory . . . . . . . . . . . . . . . . . . . . . . 62
Personal TeX macro directory . . . . . . . . . . . . . . . . . 62
pLaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Polish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Prex for labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24, 25
preview-install-styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Previewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Private directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Private macro directory. . . . . . . . . . . . . . . . . . . . . . . . 62
Private style hook directory. . . . . . . . . . . . . . . . . . . . 62
Private TeX macro directory. . . . . . . . . . . . . . . . . . . 62
Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
pTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58, 60
Q
Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Quotes, fontication of . . . . . . . . . . . . . . . . . . . . . . . . 39
R
Redisplay output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Relling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Reformatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30, 32
Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Region le. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Reindenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Reveal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Running BibTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Running chktex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Running commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Running lacheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Running LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Running makeindex. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Running TeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
S
Sample style le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Sectioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22
Sectioning commands, fontication of . . . . . . . . . . 37
Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 22, 44
Setting the default command . . . . . . . . . . . . . . . . . . 45
Setting the header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Setting the trailer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Site customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Site information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Site initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Site macro directory . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Site TeX macro directory . . . . . . . . . . . . . . . . . . . . . . 62
Slovak. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Source specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 51
Specifying a font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Starting a previewer . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Stopping a process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Style le. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Style les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Style hook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Style hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Subscript, fontication of . . . . . . . . . . . . . . . . . . . . . . 39
Superscript, fontication of . . . . . . . . . . . . . . . . . . . . 39
Swedish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
SyncTeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 51
Syntax Highlighting . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
T
Tabify. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Table environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TeX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TeX parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
tex-jp.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
tex-mik.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
tex-site.el . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 15, 81
tool bar, toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Trailer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
U
Underfull boxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
UNICODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Untabify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Updating style hooks . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Indices 104
V
Verbatim, fontication of . . . . . . . . . . . . . . . . . . . . . . 40
Viewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
W
Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Writing to a printer . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
X
x-compose.el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
X-Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58