LaTEX Editing Support

Nelson H. F. Beebe Center for Scientific Computing Department of Mathematics

University of Utah Salt Lake City, UT 84112

USA Tel: +1 801 581 5254 FAX: +1 801 581 4148

E-mail: beebe@math.utah.edu

14 September 1993 Version 1.10

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1991 Free Software Foundation, Inc.

This file documents version 1.0 of the LaTEX editing support package for GNU Emacs, version 18 or later.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through TEX and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual).

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

Contents

Licensing Information 1

1 LaTEX support 3 1.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Creating a new LaTEX file . . . . . . . . . . . . . . . . . . . 12 1.3 LaTEX macros . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.4 LaTEX environments . . . . . . . . . . . . . . . . . . . . . . 17 1.5 Common commands . . . . . . . . . . . . . . . . . . . . . . 19 1.6 Math mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.7 Dots, commas, and quotation marks . . . . . . . . . . . . . 21 1.8 Font changes . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.9 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.10 Mismatched delimiters . . . . . . . . . . . . . . . . . . . . . 25 1.11 Mismatched environments . . . . . . . . . . . . . . . . . . . 26 1.12 Word abbreviations . . . . . . . . . . . . . . . . . . . . . . . 27 1.13 Bibliographies . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.14 Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.15 Cross-references . . . . . . . . . . . . . . . . . . . . . . . . . 30 1.16 French typography . . . . . . . . . . . . . . . . . . . . . . . 32 1.17 Miscellaneous functions . . . . . . . . . . . . . . . . . . . . 33 1.18 Miscellaneous variables . . . . . . . . . . . . . . . . . . . . . 35 1.19 Customizing lists . . . . . . . . . . . . . . . . . . . . . . . . 35

2 SliTEX support 37

3 Letter support 39

4 Bug reporting 43

5 Conclusion 45 ii CONTENTS Concept Index 49 Control Sequence Index 53 Function Index 55 Key Index 59 Person Index 61 Variable Index 63

List of Tables

1.1 ‘.emacs’ file additions. . . . . . . . . . . . . . . . . . . . . . 4 1.2 Online summary of LaTEX mode. . . . . . . . . . . . . . . . 6 1.3 More about LaTEX mode. . . . . . . . . . . . . . . . . . . . 7 1.4 Even more about LaTEX mode. . . . . . . . . . . . . . . . . 8 1.5 Online help for LaTeX-index. . . . . . . . . . . . . . . . . . 9 1.6 Local bindings in LaTEX mode. . . . . . . . . . . . . . . . . 10 1.7 More local bindings. . . . . . . . . . . . . . . . . . . . . . . 11

3.1 Letter template. . . . . . . . . . . . . . . . . . . . . . . . . 40

Licensing Information

The program currently being distributed that relates to LaTEX is contained in the file ‘latex.el’ in the function LaTeX-mode and numerous other support functions. This program is free; this means that everyone is free to use it and free to redistribute it on a free basis.

Specifically, we want to make sure that you have the right to give away copies of the programs that relate to LaTeX-mode, that you receive source code or else can get it if you want it, that you can change these programs 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 the file ‘latex.el’, 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 finds out that there is no warranty for the programs that relate to ‘latex.el’. If these programs are modified 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 reflect on our reputation.

The precise conditions of the licenses for the programs currently being distributed that relate to ‘latex.el’ are found in the General Public Licenses that accompany them. The programs that are part of GNU Emacs are covered by the GNU Emacs copying terms (see section License in The GNU Emacs Manual), and other programs are covered by licenses that are contained in their source files.

2 LICENSING INFORMATION

Chapter 1

LaTEX support

1.1 Preliminaries

The material that you are now reading is contained in the distribution as two files, ‘ltxmode.ltx’ for the TUGboat article, and ‘ltxinfo.ltx’ for LaTEXinfo.

The first job is to arrange for LaTeX-mode to be selected automatically when required.

Because the ‘latex.el’ file of Lisp code is not yet a standard part of the GNU Emacs distribution, its association with particular file extensions is unknown to Emacs. To remedy that, the Lisp code in Table 1 should be inserted into the ‘.emacs’ file in your login directory; that file is processed each time Emacs starts up. The load command there tells where ‘latex.el’ is found; it may need adjustment for your system.

The peculiar if commands attach LaTeX-mode to the auto-mode-alist variable, which is a list of pairs of file extensions and their mode names; the attachment is omitted if the file extensions are already in the list.

Once this startup code has been executed, Emacs will automatically select LaTeX-mode when you visit files with extensions ‘.ltx’ (LaTEX document), ‘.stx’ (SLiTEX document), or ‘.sty’ (LaTEX style). Others can be easily added according to taste. File extension ‘.tex’ is already attached to GNU Emacs tex-mode which comes with the system, so different extensions are needed for different editing modes.

If you don’t have these associations of file extensions with editing modes in effect, you can always select the mode manually with the command M-x

LaTeX-mode.

Experienced Emacs users may wonder why the autoload facility is not

4 CHAPTER 1. LaTEX SUPPORT

;=============================================
; Add mode for .ltx files if not there already
; for most people: (load-library "latex.el")
; for my private version:
; Force tex-mode.el to be loaded so latex.el
; can override it.
(load-library "tex-mode")
(load "~/emacs/latex" t t nil)
(if (not (assoc "\\.ltx$" auto-mode-alist))
    (setq auto-mode-alist
          (cons (cons "\\.ltx$" 'LaTeX-mode)
                auto-mode-alist)))
(if (not (assoc "\\.stx$" auto-mode-alist))
    (setq auto-mode-alist
          (cons (cons "\\.stx$" 'LaTeX-mode)
                auto-mode-alist)))
(if (not (assoc "\\.sty$" auto-mode-alist))
    (setq auto-mode-alist
          (cons (cons "\\.sty$" 'LaTeX-mode)
                auto-mode-alist)))
;=============================================
; Private letter support
(load "~/emacs/letter" t t nil)

Table 1.1: ‘.emacs’ file additions. used instead of the explicit load command in the startup file; the reason lies in a conflict with the standard tex-mode. I expect that conflict will be removed when ‘latex.el’ becomes part of the standard GNU Emacs distribution. A modification of ‘tex-mode.el’ that eliminates all LaTEXspecific code has been prepared locally, and that new version removes the incompatibility with ‘latex.el’, allowing autoload to be used.

In GNU Emacs Lisp, named functions, and variables defined outside functions, are known globally. There is no provision for file scoping or mode scoping to limit name visibility. Consequently, to avoid collision with the thousands of names from other libraries, each library usually includes a distinctive phrase in its global names. Naturally enough, ‘LaTeX’ and ‘SLiTeX’ are the phrases chosen in ‘latex.el’. They are almost always used as prefixes in variable names, and usually also in function names, although a few functions have embedded phrases for better readability (e.g.

show-LaTeX-labels).

Tables 2 through 4 show the documentation summary for LaTeX-mode, which you can always reproduce online with the function describe-mode which is normally bound to the key C-h m.

Only major mode functions have such long documentation. Table 5 shows a more typical case, the documentation of the function LaTeX-index. You could produce it online with the function describe-function on C-h

d.

Tables 6 and 7 show the key bindings in LaTeX-mode; the listings can be produced by the function describe-bindings which is normally attached

to C-h b.

The name and documentation of the function attached to any key can be obtained by invoking the function describe-key attached to C-h k.

You can change existing key bindings, or add new ones, with the functions local-set-key and global-set-key, and otherwise modify the behavior of LaTeX-mode. See 1.19 [Customizing lists], page 35 for details.

LaTeX Mode: Major editing mode for LaTeX and
SLiTeX, with tex-mode underneath.
To create a new LaTeX document, use
make-LaTeX-document (on C-c d), or
make-SLiTeX-document (on C-c s).  With an
argument, they will provide some additional
helpful comments.  The functions will prompt
for document style and options.  Type ? to see
the standard ones; you can enter them with
name completion.  You can also enter your own,
since it is possible to have private styles
and options unknown to make-LaTeX-document or
make-SLiTeX-document.
The most frequent LaTeX construct is the
\begin{}...\end{} grouping; you can generate
it by LaTeX-begin-end-block (on C-c b).  With
an argument, a helpful comment may be printed.
Type ? to see the standard environments, or
enter your own.  If you type a \begin{...}
manually, you can later generate a matching
\end{...} with the function LaTeX-end (on C-c
n).
Other common constructs are the insertion of
labels, citations, cross-references, index
entries, verbatim strings, and additional
items in a list.  The functions
        C-c .   LaTeX-add-word-to-index
        C-c C-b LaTeX-bibitem
        C-c c   LaTeX-cite
        C-c k   LaTeX-counter
        C-c f   LaTeX-footnote
        C-c x   LaTeX-index
        C-c i   LaTeX-item
        C-c l   LaTeX-label
        C-c m   LaTeX-macro
        C-c p   LaTeX-pageref-with-completion
        C-c C-p LaTeX-protect
        C-c r   LaTeX-ref-with-completion
        C-c v   LaTeX-verb
        C-c d   make-LaTeX-document
        C-c s   make-SLiTeX-document
provide for these.

Table 1.2: Online summary of LaTEX mode.

1.1. PRELIMINARIES 7

LaTeX-tab (on C-c TAB) will indent a line to
the current \begin{}...\end{} nesting level.
Most major LaTeX macros can be entered by
LaTeX-macro (on C-c m).  This will supply the
correct set of following braces, brackets, and
parentheses, and with an argument, will insert
a short comment about the expected command
arguments.
For SLiTeX, the function renumber-slides can
be used to put a numbered comment on each
slide environment for handy reference in the
\onlynotes{...} and \onlyslides{...} commands.
You can move over \begin{} ... \end{} groups
with LaTeX-to-begin (on C-c a) and
LaTeX-to-end (on C-c e).
Insertion of paired angle brackets, braces,
square brackets, and parentheses is provided
by
        C-c <  LaTeX-angles
        C-c {  LaTeX-braces
        C-c [  LaTeX-brackets
        C-c (  LaTeX-parentheses
With an argument, the last three insert
backslash prefixes for literal braces, math
mode, and displaymath mode.
Unbalanced character pairs are found by
        C-c >  LaTeX-check-angle-balance
        C-c }  LaTeX-check-brace-balance
        C-c ]  LaTeX-check-bracket-balance
        C-c $  LaTeX-check-dollar-balance
        C-c )  LaTeX-check-parenthesis-balance
You can test for undefined labels with
check-LaTeX-labels, display the labels and
their line numbers with show-LaTeX-labels, and
fetch labels from an .aux file with
update-LaTeX-labels.

Table 1.3: More about LaTEX mode.

Environment nesting errors can be caught by
check-LaTeX-nesting.
Use indent-LaTeX-begin-end-groups to get
environments nested for improved visibility.
Use LaTeX-comment (on C-c %) to comment out
the current paragraph (no arg) or region
(arg); undo with M-X undo (C-_).  LaTeX-
uncomment (on C-c u) is the inverse function.
One or more words can be set in any standard
LaTeX font using the commands
        C-c C-c b       LaTeX-font-bf
        C-c C-c e       LaTeX-font-em
        C-c C-c i       LaTeX-font-it
        C-c C-c r       LaTeX-font-rm
        C-c C-c u       LaTeX-font-sc
        C-c C-c f       LaTeX-font-sf
        C-c C-c s       LaTeX-font-sl
        C-c C-c t       LaTeX-font-tt
Please report bugs, comments, and enhancements
by e-mail to
        beebe@math.utah.edu (Internet)
LaTeX-gripe (on C-c g) makes this easier.

Table 1.4: Even more about LaTEX mode.

LaTeX-index:
Insert \index{ ... } at point (on C-c x).
If a prefix argument is given, the string is
prompted for, and inserted both as text and as
an index entry, e.g. gnats and
gnus\index{gnats and gnus}.  All horizontal
space preceding \index is removed to prevent
an intervening page break causing an
off-by-one page number error.
If LaTeX-index-start-with-newline is non-nil,
insert a percent to start a comment, then put
\index at the start of a following new line.
If LaTeX-index-end-with-newline is non-nil,
follow the entry with a new line.

Table 1.5: Online help for LaTeX-index.

Local Bindings:
key            binding
---            -------
_LaTeX-subscript
^LaTeX-superscript
.              LaTeX-dot
,              LaTeX-comma
$              LaTeX-dollar
ESC            Prefix Command
LFD            newline-and-indent
C-c            Prefix Command
"              LaTeX-quote
C-c ,          LaTeX-set-indentation
C-c C-c        Prefix Command
C-c =          LaTeX-equation
C-c }          LaTeX-check-brace-balance
C-c {          LaTeX-braces
C-c x          LaTeX-index
C-c v          LaTeX-verb
C-c u          LaTeX-uncomment
C-c s          make-SLiTeX-document
C-c r          LaTeX-ref-with-completion
C-c p          LaTeX-pageref-with-completion
C-c n          LaTeX-end
C-c m          LaTeX-macro
C-c l          LaTeX-label
C-c k          LaTeX-counter
C-c i          LaTeX-item
C-c g          LaTeX-gripe
C-c f          LaTeX-footnote
C-c e          LaTeX-to-end
C-c d          make-LaTeX-document
C-c c          LaTeX-cite
C-c b          LaTeX-begin-end-block
C-c a          LaTeX-to-begin
C-c 0          renumber-slides
C-c ]          LaTeX-check-bracket-balance
C-c [          LaTeX-brackets
C-c .          LaTeX-add-word-to-index

Table 1.6: Local bindings in LaTEX mode.

C-c )          LaTeX-check-parenthesis-balance
C-c (          LaTeX-parentheses
C-c %          LaTeX-comment
C-c $          LaTeX-check-dollar-balance
C-c >          LaTeX-check-angle-balance
C-c <          LaTeX-angles
C-c C-p        LaTeX-protect
C-c C-n        LaTeX-news
C-c TAB        LaTeX-tab
C-c C-b        LaTeX-bibitem
ESC )          forward-list
ESC (          backward-up-list
C-c C-c t      LaTeX-font-tt
C-c C-c s      LaTeX-font-sl
C-c C-c f      LaTeX-font-sf
C-c C-c u      LaTeX-font-sc
C-c C-c r      LaTeX-font-rm
C-c C-c i      LaTeX-font-it
C-c C-c e      LaTeX-font-em
C-c C-c b      LaTeX-font-bf
C-c C-c }      LaTeX-check-brace-balance
C-c C-c ]      LaTeX-check-bracket-balance
C-c C-c )      LaTeX-check-parenthesis-balance
C-c C-c $      LaTeX-check-dollar-balance
C-c C-c =      LaTeX-displaymath

Table 1.7: More local bindings.

1.2 Creating a new LaTEX file

When you visit a new LaTEX file, Emacs starts up with an empty buffer. The mode line at the bottom of the screen will look something like

---Emacs: foo.ltx (LaTeX Abbrev Fill)----All---

The first thing you want to do is get a standard template of a LaTEX file inserted; you do this by typing C-c d (make-LaTeX-document). This function will first prompt you with

Document style:

to which you can respond either with a complete style file name, or with the first few characters of a standard style, followed by a space to request Emacs to complete the name, and a RETurn to accept the completion. If you are unsure of what to supply, just type a query (?); Emacs will respond with something like

Possible completions are:
aaai                               amsart
amsbook                            amstex
aps                                article
book                               deproc
letter                             ltugproc
refman                             report
siam                               slides
tugboat                            ucthesis
uoftoronto                         usafmemo
uuthesis                           xxxslides

Completion can also be requested on partial names: the input ‘a?’ in the above command will respond with

Possible completions are:
aaai                               amsart
amsbook                            amstex
aps                                article

Suppose you type ‘article’ or ‘ar<space>’, followed by a RETurn. Then Emacs will respond with

Document option (RET when done):

to which you can then supply an option name followed by a RETurn. As before, a query will show you what is available:

Possible completions are:
11pt                               12pt
a4                                 a4wide
acm                                acronym
agugrl                             agujgr
alltt                              amsbsy
amscd                              amsfonts
amssymb                            amssymbols
amstext                            apalike
archmemo                           array
bezier                             biihead
boxedmini                          changebar
chapterbib                         cite
clsc                               clscmemo
concrete                           cropmark
ctagsplt                           cyrillic
dblspace                           doublespace
draft                              drafthead
drop                               dvidoc
eqsecnum                           espo
fleqn                              format
fullpage                           geophysics
german                             gnuindex
ifthen                             intlim
ist21                              leqno
listing                            longtab
ltugboat                           makeidx
math                               merge
mfr                                mitthesis
moretext                           natsci
nl                                 nonamelm
nopageno                           nosumlim
openbib                            pandora
preprint                           proc
psmavg                             psmbkm
psmncs                             psmpal
psmtim                             remark
resume                             revtex
righttag                           sc21
sc21-wg1                           sfwmac
showidx                            showlabels
slem                               spacecites

supertab                           suthesis
tablisting                         tapeseal
texindex                           texnames
tgrind                             theorem
thp                                threepart
titlepage                          trademark
troffman                           troffms
twocolumn                          twoside
underline                          uofutah
vdm                                verbatim

You can keep on selecting options until you finally just type a bare RETurn, at which point make-LaTeX-document completes, and you have a buffer that looks like this:

% -*-latex-*-
% Document name: /u/beebe/foo.ltx
% Creator: Nelson Beebe [beebe@math.utah.edu]
% Creation Date: Sun Jul 28 08:44:46 1991
\documentstyle[11pt,makeidx]{article}
\newcommand{\X}[1]{{#1}\index{{#1}}}
\begin{document}
<cursor>
\end{document}

The cursor, represented by <cursor>, is left positioned on the line following the ‘\begin{document}’, ready for text entry.

The initial comment with the tag ‘-*-latex-*-’ is a special one. It requests an automatic mode selection when the file is freshly visited in Emacs, overriding any mode that might otherwise be selected based on the file name extension. latex-mode is made equivalent to LaTeX-mode in ‘latex.el’ so that the comment tag can be written in lower-case letters, as is conventional.

The ‘% Creator:’ comment information is obtained from Emacs’ operating system interface, which in turn fetches the user’s personal name and login name from system authorization files. On networked systems, the hostname is included as well, creating a valid electronic mail address.

Had you given make-LaTeX-document an argument, it would have been somewhat more verbose:

% -*-latex-*-
% Document name: /u/beebe/tex/tugboat/foo.ltx
% Creator: Nelson Beebe [beebe@math.utah.edu]

% Creation Date: Sun Jul 28 08:46:33 1991
%----------------------------------------------
% EVERYTHING TO THE RIGHT OF A  %  IS A REMARK
% TO YOU AND IS IGNORED BY LaTeX.
%
% WARNING!  DO NOT TYPE ANY OF THE FOLLOWING 10
% CHARACTERS AS NORMAL TEXT CHARACTERS:
%       &   $   #   %   _{   }   ^~   \
%
% The following seven are printed by typing a
% backslash in front of them:
%       $  &  #  %  _{  and  }.
%----------------------------------------------
\documentstyle[11pt,makeidx]{article}
\newcommand{\X}[1]{{#1}\index{{#1}}}
\begin{document}
<cursor>
\end{document}

The extra commentary is a useful reminder for beginning LaTEX users. Several other commands in LaTeX-mode use the presence of an argument to supply additional helpful commentary.

The ‘\X’ command is one I have found helpful for preparing indexes; typing ‘\X{gnats and gnus}’ will put that phrase in both the document and the index. Further discussion is given later; see 1.14 [Indexing], page 29.

The lists of standard styles and options are embedded in the ‘latex.el’ code. They cannot be determined automatically from the file system for several reasons:

• Some options (e.g. ‘11pt’) do not have a corresponding style file.

• Some style files do not represent a valid option (e.g. ‘art10.sty’).

• Some style files found in the normal TEXINPUTS search path belong to other systems, such as AmSTEX.

• It is impossible to distinguish from the ‘.sty’ file extension whether the file represents a major document style, or merely an option that modifies a major style.

It is regrettable that these difficulties exist, because they confuse users, as well as programmers of code like LaTeX-mode. It is often difficult to tell from its contents whether a particular file is a major style, or just a document option. It would have been wiser in the initial LaTEX design to have chosen distinctive file extensions, and for each style and option to be associated with a unique file.

The present collection of twenty available styles and over one hundred options is daunting for a novice, particularly since many options can only be used with certain styles. Eventually I may find a satisfactory way to deal with this, and offer a better presentation of choices in the completion lists.

The style and option lists can be easily extended. See 1.19 [Customizing lists], page 35 for details.

1.3 LaTEX macros

Every one of the 589 LaTEX macros in the index to the LaTEX User’s Guide and Reference Manual [14] is known to the function LaTeX-macro (on C-c m), and as before, Emacs command completion is available with the query (?) and space (<space>) characters. Thus, you can type

   • C-c m longr<space> RETurn to get ‘\longrightarrow’;
   • C-c m em RETurn to get
     ‘{\em <cursor>\/}’

with the cursor positioned ready for you to enter some text;

   • C-u C-c m newcom<space> RETurn to get
     \newcommand{<cursor>}[]{} % {\cmd}[n]{def} define new
                               % command with n arguments

• C-c m e? to find the names of macros that begin with e:

     Possible completions are:
     ell                            em
     emptyset                       encl
     end                            epsilon
     equiv                          eta
     evensidemargin                 exists
     exp                            extracolsep

When the cursor is left after an open brace in a generated command, the closing brace is by default placed at the start of the next line so that you have a clean line to type on. This reduces visually-distracting screen updates, but means that you will need to delete the end-of-line character when you finish typing the argument. If you don’t like this behavior, you

can set the Emacs variable LaTeX-newline-after-opening-delimiter to

a nil value, usually in your ‘.emacs’ startup file:

(setq LaTeX-mode-hook
 '(lambda ()
    (setq LaTeX-newline-after-opening-delimiter
          nil)
    )
 )
The variable LaTeX-newline-after-closing-delimiter is used similarly

for brace pairs inserted on their own, or after certain macros.

A mode hook is Lisp code to be executed whenever the corresponding mode function is executed. The hook is called just before the mode function returns, so it can override anything that the function did. The peculiar ‘lambda ()’ is the Lisp way of declaring a nameless function. The single quote prefixing it means that LaTeX-mode-hook will be assigned the function itself, and not the value returned by the function.

In GNU Emacs, you can execute Lisp code in a file through M-x loadfile and M-x load-library commands. Inline code must be executed in a buffer which is in emacs-lisp-mode. The minibuffer always has that mode, and can be temporarily accessed with the eval-expression function

bound to ESCape ESCape.

If you just want to set an Emacs variable, you can also use the command M-x set-variable; it supports completion on the variable name, and prompts for the value.

The availability of all of the LaTEX macros with LaTeX-macro reduces the likelihood of spelling mistakes, and the command completion usually means that only a few leading characters need to be typed. The complete macro name is entered in the buffer: ‘\abovedisplayshortskip’ is much more readable than a cryptic ‘\adss’ that LaTEX users without such editing support might be inclined to define as a private macro to save typing effort.

If you have frequently-used private macros, there is a convenient way to make them known to LaTeX-mode. See 1.19 [Customizing lists], page 35 for details.

1.4 LaTEX environments

An important concept in LaTEX is the notion of environments, which are marked by surrounding ‘\begin{...}’ and ‘\end{...}’ commands. The braced tag must be repeated, and if the tag name is long, spelling errors are more likely. The function LaTeX-begin-end-block on C-c b generates the command pair, indented according to the current nesting level, and leaves the cursor on the line between them. The indentation is controlled by the value of the Emacs variable LaTeX-begin-end-indentation; the default is two spaces.

   If the variable LaTeX-space-after-begin-end is non-nil, a space will

be inserted between the keyword and the following opening brace. The default value is nil. This formatting style is discouraged, because it cannot be applied uniformly; it must be suppressed for the ‘verbatim’ environment. The code in ‘latex.el’ knows about this vagary, and always omits the space for that environment.

   The keystrokes C-c b quoteRETurnC-c b ite<space>RETurnC-c b
verb<space> RETurn produce
  \begin{quote}
    \begin{itemize}
      \item
\begin  {verbatim}
<cursor>
\end  {verbatim}
      \item
      \item
      \item
    \end{itemize}
  \end{quote}

with the cursor inside the ‘verbatim’ environment. Notice that the normal indentation is automatically suppressed for that environment; the command knows that leading spaces in front of ‘\end{verbatim}’ would otherwise generate an unwanted blank line in the typeset output.

If you have private environments, you can still use C-c b; you just have to type the complete environment name. If you use some private ones frequently in different documents, it is possible to extend the list of environments known to LaTeX-mode. See 1.19 [Customizing lists], page 35 for details.

In those environments that have ‘\item’ commands, four are generated by default; that number can be changed by modifying the value of the Emacs variable LaTeX-item-count. Their indentation is defined by the variable LaTeX-item-indentation; the default is two spaces. Additional indentation of text under a ‘\item’ command is set by the variable LaTeXitem-info-indent; the default is six spaces.

You can generate additional ‘\item’ commands as needed with the function LaTeX-item on C-c i. With an argument, it supplies the alternate form ‘\item[]’ instead.

If you forgot about the C-c b command, and manually typed a ‘\begin {conjecture}’, you can get the matching ‘\end{conjecture}’ generated automatically by typing C-c n (LaTeX-end). That is also sometimes helpful when you have forgotten what environment you are in: you can generate the ‘\end{...}’, and then kill it.

You can type C-c a (LaTeX-to-begin) to move backward to the enclosing ‘\begin’; with an argument, you can move backward over a specified number of ‘\begin{...}’s. If the argument is negative, you move forward over ‘\end{...}’s instead. Usually, you would use C-c e (LaTeX-to-end) instead to move forward over ‘\end{...}’s; that command handles numeric arguments too, and reverses direction for negative arguments.

These two movement commands are analogous to the standard Emacs commands for moving backward and forward in sentences, normally bound to M-a and M-e. They also require that the ‘\begin’ and ‘\end’ macros be preceded on their lines only by optional whitespace, and immediately followed by open braces. This helps to enforce the discipline of keeping the ‘\begin{...}’ …‘\end{...}’ grouping properly nested and readable, and also avoids having to deal with more complex input parsing.

1.5 Common commands

Some LaTEX macros are used so often that it is desirable to have them bound directly to keys, instead of having to type their first few characters with LaTeX-macro as described earlier. You can find a list of these convenience functions in the fourth paragraph of Table 2.

For example, typing C-c l (that’s the letter ‘l’) generates

~\label{<cursor>}

at the cursor position, leaving the cursor after the open brace.

1.6 Math mode

TEX’s math mode uses paired dollar signs to delimit the math text. Single dollar signs mark inline math, and doubled ones mark display math. If you forget to type a closing dollar sign, or type the wrong number of dollar signs, TEX will complain bitterly.

The start and finish of these math regions are indistinguishable, making it hard for simple programs (and sometimes, readers) to distinguish the ‘inside’ from the ‘outside’.

Consequently, LaTEX additionally supports two bracketing forms:‘\(’ …‘\)’ for ‘$ ... $’, and ‘\[’ …‘\]’ for ‘$$ ... $$’, as well as more readable forms

  \begin{math}
  ...
  \end{math}
  \begin{displaymath}
  ...
  \end{displaymath}

for the single and double dollar sign pairs, respectively. All of these have unique opening and closing sequences.

LaTeX-mode supports all of these forms. The variants selected are de-

termined by the variables LaTeX-math-option and LaTeX-displaymath-

option. Values of 0, 1, and 2 select the dollar, backslashed delimiter, and ‘\begin{...}’ …‘\end{...}’ environment forms respectively; all other values are equivalent to 0. The default values select the single dollar and

‘displaymath’ forms.

Normally, when you type a dollar sign, you get an inline math environment. If the dollar sign happens to be at the beginning of a line, it expands instead into a display math environment. On the other hand, if the preceding character was a backslash, you just get a plain dollar sign.

Spacing around the inserted text is controlled by two more variables. If

LaTeX-newline-after-opening-delimiter is non-nil (the default), the

opening delimiter is followed by a newline, with the cursor positioned immediately after the delimiter for the inline case, and on a new line for the

display form. If LaTeX-newline-after-closing-delimiter is non-nil

(the default), the closing delimiter is followed by a newline.

This pleasantness is our first example of having an alternate function bound to a normal printing character. Instead of running the usual selfinsert-command attached to printing characters, ‘$’ is bound to LaTeXdollar which has been programmed to deal with the three different meanings of the dollar sign. Few editors outside the Emacs family could do this; the critical feature is that any character can run any function.

What if you really just wanted a single plain dollar sign, with no preceding backslash? Well, that is easy. In Emacs, any character can be quoted, which causes it to be inserted directly into the buffer; the quoted-insert function is normally bound to C-q, but that too can be changed. Thus, C-q $ will get you a literal dollar sign, if that is what you really want.

The function LaTeX-equation on C-c = generates

  \begin{equation}
<cursor>
  \end{equation}

with the cursor between them. LaTeX-displaymath on C-c C-c = inserts

  \begin{displaymath}
<cursor>
  \end{displaymath}

All math mode environments (‘array’, ‘eqnarray*’, ‘eqnarray’, ‘math’,

and ‘theorem’) can be also generated by LaTeX-begin-end-block on C-c

b, and additional ones can be easily added; see 1.19 [Customizing lists], page 35.

   LaTeX-subscript on _(underscore) and LaTeX-superscript on ^

(caret) generate braced subscript and superscript sequences, leaving the cursor between the braces [20].

1.7 Dots, commas, and quotation marks

The dot or period (full stop, to some of you) is an overloaded character. Normally, it just means end of sentence. Sometimes, it ends an abbreviation in the middle of a sentence. It can also be a decimal point, as in 3.14159. Still other times, it appears in ellipses, as in centered dots (‘\cdots’), diagonal dots (‘\ddots’), ellipses (‘\ldots’), and vertical dots (‘\vdots’).

In typography, these uses are distinguished by small changes in spacing after the dots. That is why TEX provides control sequences for the ellipses, and the LaTEX book [14, p. 14] recommends that you type a ‘\<space>’ sequence after a period that does not end a sentence.

TEX assumes that a period following an upper-case letter does not end a sentence (it might be someone’s initial) [13, pp. 74, 311], and follows it with a smaller amount of space. The LaTEX User’s Guide and Reference Manual recommends insertion of ‘\@’ before a sentence-ending dot that follows an upper-case letter in order to get additional space after the dot.

LaTeX-mode handles these intricacies by binding dot to the function LaTeX-dot. That function examines what is immediately before the dot in the buffer, and takes one of several actions:

• If the dot ends an ellipsis, the three dots are replaced by ‘\ldots{}’.

• If the dot is preceded by an italic correction at group end, ‘\/}’, the italic correction is removed.

• If the dot ends an abbreviation, like e.g. or i.e., it inserts a ‘\<space>’ command or a comma, depending on whether the variable LaTeX-

     comma-after-dotted-abbreviation is nil or non-nil. Tradition-

ally, such abbreviations are followed by a comma, but modern tendency is to omit the comma [19, p. 84], although Knuth disagrees [13, p. 74].

• If the previous characters are abbreviations like Fig., cf., vs., and resp. [13, p. 74] [14, p. 18] that should be tied to the following word with a single unbreakable space, the function inserts a tilde to mark the tie.

• If the dot follows two or more upper-case letters, the dot is prefixed by ‘\@’.

To prevent confusion with words at end of sentence, abbreviations are not recognized if they are immediately preceded by a letter in the editing buffer.

The abbreviations known to LaTeX-dot are defined by the variable

LaTeX-standard-dotted-abbreviations. More can be added by a suit-
able definition of the variable LaTeX-extra-dotted-abbreviations, such

as this example:

(setq LaTeX-extra-dotted-abbreviations
      '(
        ("ad. lib.")
        ("cwt.")
        ("q.e.d.")
        )
      )

See 1.19 [Customizing lists], page 35 for more details.

The abbreviations for which ties are supplied are similarly defined by the

variables LaTeX-standard-tied-abbreviations and LaTeX-extra-tied-
abbreviations.

LaTeX-dot cannot tell whether a dot following an upper-case letter is a sentence-ending one or not, so it only inserts ‘\@’ before a dot if there are two or more preceding upper-case letters. It is up to the user to remember to insert ‘\@’ in the exceptional case of a single final upper-case letter.

What about a dot after a macro that expands to a word ending in an upper-case letter, like TEX itself? No ‘\@’ is necessary there, because TEX treats that dot as a normal end of sentence.

These actions cover most of the common cases, but of course, for abbreviations, cannot be omniscient. Dictionaries that I consulted listed over a thousand abbreviations in use in English. Fewer than a dozen of the com-

monest ones are included in LaTeX-standard-dotted-abbreviations, but
customization of LaTeX-extra-dotted-abbreviations provides a way to

add new ones.

Emacs’ quoted-insert function saves the day when you want to suppress all of this wizardry; just type C-q . to get a literal dot inserted.

LaTeX-comma bound to comma removes any immediately preceding italic correction, and then inserts a comma.

Italic corrections are somewhat of a nuisance, since you are supposed to have them after italicized text, except a period or a comma, which are so low that it doesn’t matter if the character to their immediate left leans over them. Those two exceptions make it hard to write a TEX macro to determine whether the correction is needed or not. I’d rather let Emacs remember for me, so I programmed it to do so.

Good typography uses different opening and closing quotation marks; in TEX, you get “quoted text” by typing ‘``quoted text''’. Because many people are accustomed to using the double quotation mark character, ‘"’, found on computer keyboards and typewriters, the function LaTeXquote is bound to that character. It generates the correct paired opening grave accents, ‘``’, or closing apostrophes, ‘''’, as appropriate: the input ‘"quoted text"’ expands to ‘``quoted text''’ in the edit buffer. With an argument, the function inserts a bare double quotation mark; you can get the same effect from quoted-insert by typing C-q ".

1.8 Font changes

The LaTeX-macro function on C-c m lets you easily generate font changes to any of LaTEX’s eight standard styles, including supplying the italic correction in the three leaning font styles (‘\em’, ‘\it’, and ‘\sl’).

But what if you are revising a document, and decide to add a font change? Well, you could use C-c m to do it, but then you’d have to move the closing brace, and any preceding italic correction.

LaTeX-mode provides a better solution: customized functions wrap a font change around the current word, or if a numeric argument is given, around that many words starting from the current one. These functions are listed in Table 7. They are almost the only functions that require a second prefix character; C-c C-c e (LaTeX-font-em) is easy to type, and retains mnemonic significance. These functions handle the italic correction properly; leaning fonts get it unless the character following the last word is a period or a comma.

1.9 Comments

TEX provides an inline comment mechanism with the percent sign. It discards text from that character to the end of the line, plus all leading space on the next line up to, but not including, its end-of-line character.

Sometimes, however, you want to temporarily suppress typesetting of a part of a document without actually removing it from the file. One way is to insert leading percents on each line of the region to be suppressed, but that is tedious to do manually. A second way is to use LaTEX’s ‘ifthen’ style option which added loops and conditionals, but appeared after the LaTEX User’s Guide and Reference Manual was written, and so is not widely known. A third way is to define a LaTEX macro like

\newcommand{\comment}[1]{}

However, that won’t work if the argument contains paragraph breaks. You could drop down to low-level TEX and write

\long\def\comment#1{}

but LaTEX users are not supposed to do that, except in style files. Also, both of these macros risk overflowing TEX’s input buffer, since the complete argument might be rather long, even if it is subsequently discarded.

I often wish that LaTEX had provided a standard ‘comment’ environment to do this; it could be implemented much like ‘verbatim’, except that it must support properly nested ‘comment’ environments. Rainer Schöpf has implemented a version of a ‘comment’ environment in a new ‘verbatim’ implementation for LaTEX [18], although nested comments are not yet supported.

The solution provided by LaTeX-mode is the function LaTeX-comment on C-c % which implements the first choice above. By default, it comments out the current paragraph, or with an argument, the current region. The comment prefix inserted at the beginning of each line is defined by the variable LaTeX-comment-prefix; its default value is ‘%%:<space>’. A unique prefix is desirable to distinguish such lines from ordinary comments. You should avoid using any regular-expression matching characters in it.

You can remove the comments inserted by LaTeX-comment by using the function LaTeX-uncomment on C-c u. It should normally be used with an argument to act on a region, instead of a paragraph. The reason for this is that paragraphs are recognized according to the regular expression in the Emacs variable paragraph-separate; the default setting is such that a line containing only a comment ends a paragraph. Consequently, LaTeX-uncomment will do nothing because its ‘paragraph’ is always empty. Invoking it with an argument to process a marked region solves the problem.

1.10 Mismatched delimiters

TEX gets very unhappy when it finds mismatched braces, and in complex documents, it can sometimes be difficult to find them. The job is not made easier on low-resolution screen displays where braces and parentheses are virtually indistinguishable. Finding such mismatches is a job for a computer, not a human, and LaTeX-mode offers you help.

Braces are not the only things you might want assistance with. Checking for mismatched parentheses, square brackets, and angle brackets is also supported. These normally insert themselves when you type them, but LaTeX-mode has commands that insert pairs: typing C-c { gets you a pair of open and close braces, and similarly for C-c [, C-c (, and C-c <. These are the default bindings of the functions LaTeX-braces, LaTeX-brackets,

LaTeX-parentheses, and LaTeX-angles.

If you get in the habit of using these instead of typing the delimiter pair yourself, you will rarely have mismatch problems. Emacs itself has native delimiter matching support: as you type a close delimiter, the cursor flashes briefly to the matching open delimiter.

But what if you didn’t follow my advice, typed a lot of braces yourself, and then when TEX complained about unbalanced braces, you couldn’t find the errors? Well, the function LaTeX-check-brace-balance bound to C-c } will scan the buffer from the current point to the end, checking for unbalanced braces, and brace pairs separated by unusually long strings, but ignoring backslashed braces. It complains if it finds a paragraph break between braces, unless you give it an argument. If mismatches are detected, you are so informed, and the positions of the mismatches are remembered on Emacs’ stack of marks, so you can easily get to them.

   Similar functions LaTeX-check-angle-balance, LaTeX-check-
bracket-balance, and LaTeX-check-parenthesis-balance are provided

on C-c >, C-c ], and C-c ), for checking those delimiter balances. Note the key binding symmetry: C-c open-delimiter inserts the pair, and C-c close-delimiter checks the balance.

The characters ‘<’ and ‘>’ are likely to be used in math mode, and not require balancing. However, you might also have used them for other purposes. In such a case, you can just add matching delimiters inside comments in your math mode uses, and then C-c > will work satisfactorily.

   There is also LaTeX-check-dollar-balance on C-c $. It looks for

dollar pairs separated by long strings, ignoring backslashed dollars. It also complains about paragraph breaks between dollar pairs, unless it is given an argument. There is no way for a computer program that is much less complex than TEX to tell the inside of math mode from the outside, so you can confuse this function by starting it inside math mode.

   The Emacs variables LaTeX-angle-interval, LaTeX-brace-interval,
  LaTeX-bracket-interval, LaTeX-dollar-interval, and LaTeX-

parenthesis-interval set the limiting between-delimiter string length before a warning is raised; their default values are each set to 500 characters.

1.11 Mismatched environments

If you have a complex document where ‘\begin{...}’ …‘\end{...}’ groups have been typed manually, you can also end up with mismatched environments that are hard to find.

The command M-x check-LaTeX-nesting scans the buffer to ensure the correctness of ‘\begin{...}’ …‘\end{...}’ nesting. If, for example, your buffer contains a nesting error like this

  \begin{verse}
...
    \begin{quote}
...
  \end{verse}
...
    \end{quote}

the command will terminate with the cursor in front of the ‘\end{verse}’ with the error message

This \end{verse} is matched by preceding \begin{quote}
at mark.
The Emacs function exchange-point-and-mark on C-x C-x will move the

cursor to the mismatching ‘\begin{quote}’. After fixing the error, you can

rerun the nesting check by typing C-x ESCape (repeat-complex-command)

until it finally reports

[done] -- all \begin{}-end{}s balance.
   The command M-x indent-LaTeX-begin-end-groups indents ‘\begin

{...}’ …‘\end{...}’ groups according to their nesting level, which helps to make the input file more readable.

You don’t need these commands very often, so they do not have default key bindings.

1.12 Word abbreviations

Emacs provides a convenient word abbreviation facility that permits the automatic expansion of a string of letters when the following space or punctuation is typed. LaTeX-mode provides this by default with a set of abbreviations in a table that can be customized for personal use.

You can find the complete set of abbreviations by examining the value of the variable LaTeX-mode-abbrev-table, or by invoking the function listabbrevs. You can make changes most easily with M-x edit-abbrevs.

The commonest abbreviations recognized in LaTeX-mode are for macro names that are awkward to type: the input ‘latex ’ expands to ‘\LaTeX{} ’, ‘tex ’ to ‘\TeX{} ’, and so on.

Note particularly that the expansion here is to ‘\TeX{}’, and not ‘\TeX\<space>’! There are good reasons for this:

• If you terminate macro names with ‘\<space>’ instead of with ‘{}’, you have to remember to do that only where a space would really be permitted; in particular, you don’t want the ‘\<space>’ before punctuation. You can use ‘{}’ consistently in both cases.

• If the ‘\<space>’ appears at the end of a line, and trailing spaces are subsequently stripped, you now have a new macro equivalent to ‘\^^M’, which might have a different meaning. Although both ‘plain.tex’ and ‘lplain.tex’ make the two macros equivalent, that might not always be the case.

You should never count on end-of-line blanks being preserved; some e-mail systems, and some editors, may delete them. Text filling and justification as commonly used in Emacs can also remove them.

• In composite words, like ‘\TeX{}book’, the braces keep the parts together for text fill operations, word counting, spell checking and so forth, while the form ‘\TeX book’ will not.

The form ‘{\TeX}’ has the almost same advantages over ‘\TeX\<space>’ as ‘\TeX{}’ does, but has one drawback: if you need to ‘\protect’ it, then you must do so inside the braces. Use of a final empty brace pair therefore seems the best choice.

By Emacs convention, word abbreviation mode is never turned on automatically; you must explicitly toggle it on a case-by-case basis by executing the command M-x abbrev-mode. If you always want it selected in LaTeXmode, add it to your ‘.emacs’ file in a mode hook:

(setq LaTeX-mode-hook
      '(lambda ()
         (abbrev-mode 1)
         )
      )

If you have other things to set in that mode hook, they should go on the lines immediately before or after the ‘(abbrev-mode 1)’ line, since there can be only one mode hook for each editing mode.

1.13 Bibliographies

Literature citations are conveniently provided for on C-c c (LaTeX-cite), which generates a ‘\cite{}’ command with the cursor after the open brace. With an argument, it produces ‘\cite[]{}’ instead, with the cursor between the square brackets.

There is another function, LaTeX-bibitem, on C-c C-b, which generates a ‘\bibitem{}’ for you; with an argument, it produces ‘\bibitem[]{}’. Normally, you should be using a program like BibTEX [14, Appendix B] or ‘Tib’ [1, 2] for preparation of bibliographies from a data base and the citations recorded in the LaTEX ‘.aux’ file. If you find yourself using this command, you are doing the job the hard and inflexible way.

LaTeX-mode automatically invokes the function update-LaTeX-bibtags to extract the list of bibliography files from the ‘\bibdata’ command in the ‘.aux’ file, or the ‘\bibliography’ command in the LaTEX file. Each such file is then located in the BIBINPUTS search path, and scanned to extract citation tags which are stored as an association list in the variable LaTeXbibtags. Each list entry contains a citation tag and the name of the file in which the tag was found.

If the BIBINPUTS environment variable is not set, then the Emacs variable LaTeX-BIBINPUTS is used instead to get a suitable search path.

You can view the citation tag list by invoking the function show-LaTeX-

bibtags.

You can request completion on a citation tag inside a ‘\cite’ command by using the function LaTeX-bibtag-with-completion normally bound to

C-c C.

If you are visiting a subfile in a multi-file document, or have just modified the list of bibliography files in the ‘\bibliography’ command, you should manually run update-LaTeX-bibtags to update the variable LaTeX-

bibtags.

1.14 Indexing

Index preparation is a tedious job that cannot be entirely automated [3, 4, 5, 6, 15]. Nevertheless, technical documents can benefit significantly from a good index, and support tools like ‘makeindex’ or ‘texindex’ can handle much of the drudge work of sorting and formatting the index entries.

LaTeX-mode provides two functions to support generation of index entries in the LaTEX file.

LaTeX-add-word-to-index on C-c . wraps an index entry around the word at the cursor position, either using a private indexing macro like ‘\X’ described earlier (see 1.2 [Creating a new LaTeX file], page 12), or by duplicating the word inside a standard LaTEX ‘\index’ command. The choice between the two is determined by the Emacs variable LaTeX-index-macro; a non-nil value supplies the indexing macro name. With a numeric argument, multiple words can be selected for indexing.

   LaTeX-index on C-c x generates
‘\index{<cursor>}’

so you can type an explicit index entry that will not appear at that point in the text.

For use in the X Window System on workstations and personal computers acting as X clients, ‘latex.el’ provides additional functions, x-LaTeX-index-start and x-LaTeX-index-end that are bound to mouse actions; they cannot usefully be invoked from the keyboard.

To index a phrase in the document like gnats and gnus, simply hold down the shift key and click the right mouse button at the start of the first word, and then holding the button down, sweep the mouse across the entire phrase, lifting the button anywhere in the last word. Bingo: the buffer now

contains ‘\X{gnats and gnus}’!

I find it useful to sit down with a typeset copy of a document, and use a colored highlighter pen to mark phrases to be indexed. With the marked-up copy, it is then straightforward to use the mouse to add the marked phrases to the index. For documents like this one, with lots of technical terms to be indexed, it pays to think about matters before you start writing. Define suitable macros that will typeset those terms in a particular font, and also automatically create an index entry for them. For example, I typeset and index an Emacs function using a private ‘\FUNCTION{}’ macro.

   The Emacs variable LaTeX-index-start-with-newline can be set to

a non-nil value if you prefer to have the inserted index entry start a new line. The variable LaTeX-index-end-with-newline can be set to a nonnil value to have a newline generated after the inserted index entry. The default for both is nil, so that no additional lines are generated.

1.15 Cross-references

LaTEX’s ‘\label’, ‘\pageref’, and ‘\ref’ commands provide a convenient way to generate cross-references to equations, figures, pages, sections, and tables. In LaTeX-mode, they are readily available on the keys C-c l (that’s the letter ‘l’), C-c p, and C-c r.

Since definitions with ‘\label’ tend to be separated from their references, you may often find yourself unable to remember the exact name of the label you want. If you type the label name incorrectly, you won’t discover the error until you have run LaTEX twice. To avoid this delay, two functions provide additional support:

• show-LaTeX-labels finds all labels in the buffer and displays them with their line numbers; I ran that function while I was writing a companion article, and got the output

LaTeX labels for buffer ltxmode.ltx (in alphabetical \
order).  Mouse-2 or C-c C-c goes to label.
1862: "X-command"
3793: "customizing-lists"
1324: "fig-bindings-1"
1455: "fig-bindings-2"
1258: "fig-latex-index"
1099: "fig-latex-mode-1"
1188: "fig-latex-mode-2"
4083: "fig-letter"
1554: "fig-startup-code"
748: "gnu-emacs-size"
3159: "indexing"
1487: "latex-support"
2030: "mode-hook"
2629: "quote"
2976: "word-abbreviations"

showing the labels in alphabetical order. With an argument, the labels are shown instead in line number order. The labels are displayed a buffer in Emacs occur-mode. You can position to any one of them, and then type C-cC-c to jump to the location in the LaTEX buffer where the label is defined. With Emacs version 19 or later, you can also click the middle mouse button on an entry in the label buffer: the cursor in the LaTEX buffer will move to the point of definition and the label will be highlighted.

• check-LaTeX-labels scans the entire buffer, looking for labels that are referenced, but undefined. At each such label found, a recursive edit is entered to allow you to supply the missing label; when you exit the recursive edit, the search for undefined labels continues from where it left off.

These functions locate label references by searching for the string defined by the variable LaTeX-label-reference; it contains a regular expression that normally matches both ‘\pageref’ and ‘\ref’. If you have defined private macros that also receive labels as arguments, you may wish to extend it. For example, the companion document has ‘\FIGREF’ and ‘\PAGEREF’ macros that simplify cross-referencing.

Similarly, these functions locate label definitions by searching for the string defined by the variable LaTeX-label-definition, another regular expression that normally matches ‘\label’. You may wish to customize it if private macros also generate labels.

Multi-file documents pose a challenge: labels defined in one file may be referenced in another file, and it would be helpful to be able to show a list of all currently-defined labels when one is needed for a cross-reference.

It is not feasible for the code in ‘latex.el’ to attempt to figure out what files are used for a particular document, nor is it acceptable to ask the user to provide those file names. Yet we somehow need to scan those files to find all of the labels.

The solution is that LaTEX can do part of this job for us: LaTEX processing of the master file produces in the corresponding ‘.aux’ file all defined labels embedded in ‘\newlabel’ commands. The function update-LaTeX-labels does the remainder of the job: it prompts for the name of the master ‘.aux’ file, and then scans it to extract a list of labels from the ‘\newlabel’ commands. This list is then appended to the current contents of the variable LaTeX-aux-file-label-tags. Augmentation, rather than replacement, permits selective construction of list subsets by multiple invo-

cations of update-LaTeX-labels on different files. check-LaTeX-labels

includes the values from LaTeX-aux-file-label-tags in its list of defined labels.

For convenience, whenever LaTeX-mode is run (normally when a file is first visited), it will search the buffer for the first TEX macro which is preceded only by optional whitespace on its line. If that macro is ‘\documentstyle’, then the file must be the master file for the document,

so LaTeX-aux-file-label-tags is set to nil, and update-LaTeX-labels

is automatically called on the corresponding ‘.aux’ file. This means that manual invocation of update-LaTeX-labels is needed only when you visit a sub-file without first visiting the master file.

   In recent versions of ‘latex.el’, LaTeX-pageref and LaTeX-ref have
been augmented by LaTeX-pageref-with-completion and LaTeX-ref-

with-completion. The new functions are bound to C-c p and C-c r, replacing the bindings to the older functions. The new ones use an internal function to dynamically scan the buffer for ‘\label{}’ definitions, add the contents of LaTeX-aux-file-label-tags to the labels collected, and construct a list that can be used for command completion. They then prompt for a label, and if you type a query, they will display the current list of labels. You can use completion to select any one of them, or you can enter an arbitrary label that is not in the completion list.

Here is what the completion list looks like for this document:

Possible completions are:
X-command                    customizing-lists
fig-bindings-1               fig-bindings-2
fig-latex-index              fig-latex-mode-1
fig-latex-mode-2             fig-letter
fig-startup-code             gnu-emacs-size
indexing                     latex-support
mode-hook                    word-abbreviations

Because the dynamic label scan that happens each time these functions are executed may be slow in large documents, the old functions remain available for rebinding to keys.

   The Emacs variable LaTeX-label-start-with-newline can be set to

a non-nil value if you prefer to have the inserted label entry start a new line. The variable LaTeX-label-end-with-newline can be set to a nonnil value to have a newline generated after the inserted label entry. The default for both is nil, so that no additional lines are generated.

1.16 French typography

English typographical conventions for spacing around punctuation are at odds with good French typography. TEX’s ‘\frenchspacing’ macro [13, p. 74] [14, p. 154] does not entirely satisfy French conventions: it only makes spaces after punctuation the same as interword spaces.

In French typography, the punctuation characters ‘: ; ? !’ are preceded by an unbreakable interword space (in TEX language, a tie). Emdashes (—) are always surrounded by spaces; in English typography, such spacing is a matter of personal style. Quotations are made with guillemets as ‘<< ... >>’, instead of as “…”; the open guillemet is followed by a space, and the close one is preceded by a space.

The GUTenberg organization has developed a standard TEX and LaTEX style file, ‘french.sty’, to provide suitable definitions of the guillemets as the control sequences ‘"<’ (or ‘\flqq’) and ‘">’ (or ‘\frqq’), as well as more convenient accent primitives.

It is tedious to remember to type the TEX tie command everywhere that special French punctuation spacing is required, so the minor mode function French-LaTeX-mode is provided in ‘latex.el’. Each time it is invoked, it toggles between French and non-French conventions. It can be used in either TEX or LaTEX files.

When French mode is selected, the Emacs mode line contains the

string ‘French’, and new functions LaTeX-French-colon, LaTeX-French-
exclamation, LaTeX-French-langle, LaTeX-French-minus, LaTeX-
French-query, LaTeX-French-rangle, and LaTeX-French-semicolon are

bound to the appropriate keys. The quotation mark is rebound to selfinsert-command so that the special handling normally provided by LaTeXquote (see 1.7 [Dots and commas and quotation marks], page 21) is suppressed.

The French angle bracket functions insert an angle bracket, expand ‘<<’ to ‘"<’, and ‘>>’ to ‘">’, and then supply the necessary ties. Isolated angle brackets are inserted without further modification. Guillemets can thus be inserted either by typing their named control sequences, or by ‘"<’ or ‘<<’, and ‘">’ or ‘>>’.

LaTeX-French-minus inserts a minus sign, and if it is the end of an em-dash, supplies surrounding spaces (not ties).

While it would be possible to have TEX provide for the French spacing requirements by suitable macro definitions of active characters, such redefinitions risk interfering with other macros. It seems best to provide for the spacing requirements in the input file itself, letting Emacs remember the necessary rules.

French mode can be customized by defining a suitable value of the French-LaTeX-mode-hook variable; see 1.3 [LaTeX macros], page 16.

1.17 Miscellaneous functions

LaTeX-counter on C-c k generates a counter name with completion, using the names stored in the variable LaTeX-standard-counters.

   LaTeX-footnote on C-c f generates a ‘\footnote{}’. Not only

does this save typing, but it also prevents my fingers from producing ‘\bootnote{}’, which looks reasonable enough, but makes TEX unhappy.

Non-nil values of the variables LaTeX-footnote-end-with-newline and
LaTeX-footnote-start-with-newline request that newlines be generated

before and after the footnote; the default values are nil.

LaTeX-news on C-c C-n views the ‘latex.el’ file to show the revision history recorded in it.

   LaTeX-tab on C-c Tab indents to the current ‘\begin{...}’ . . .‘\end

{...}’ nesting level.

LaTeX-protect on C-c C-p inserts a ‘\protect’ macro at the current point. It is needed whenever fragile commands (e.g. any LaTEX command that has a star form [14, p. 27]) are present in a moving argument [14, p. 151]. In particular, all macros in ‘\index{}’ entries should be preceded by ‘\protect’. Otherwise, you can get long macro expansions that cause buffer-overflow problems for indexing programs, and make the index file hard to read. Also, macro expansions can introduce special characters which cause problems for indexing programs like ‘makeindex’.

LaTeX-set-indentation on C-c , sets the current indentation column to the value of its argument, or to the cursor column if there is no argument. It is only rarely necessary to use this function, because the indentation is reset by several other functions.

LaTeX-verb on C-c v generates a ‘\verb|...|’ command with the cursor after the first vertical bar. With an argument, it creates the ‘\verb*|...|’ form, which makes spaces visible. The delimiter character can be changed from a vertical bar by reassigning the Emacs variable LaTeX-verb-delimiter. For example, to set it to a plus sign instead of a vertical bar:

(setq LaTeX-verb-delimiter ?\+)

The funny ‘?\’ prefix is one of Lisp’s character quotes. As shown elsewhere (see 1.3 [LaTeX macros], page 16), this assignment should normally be placed inside a mode hook. It can also be executed dynamically inside the Emacs minibuffer. Alternatively, you can use M-x set-variable; it will prompt for the variable name and value.

There are several other functions in ‘latex.el’ that I shall not document here; they are intended for internal use only, and are subject to change without warning. They all begin with the reserved prefix internal-.

1.18 Miscellaneous variables

There are a number of variables that we have not yet described. You should not have to modify any of them, but you occasionally might want to know what they are.

LaTeX-current-indentation tracks the current environment indentation as the number of spaces from the left margin. It is updated dynamically by many functions.

LaTeX-mode-map holds the map that associates keys with functions. LaTeX-mode-version is a string containing the version number and date

of the last revision to the code. You should cite its value when reporting bugs; LaTeX-gripe puts it in the e-mail subject line.

LaTeX-standard-environments contains the list of environment names

used by LaTeX-begin-end-block.

LaTeX-standard-fonts holds a list of font names and sizes.

LaTeX-standard-italic-fonts is a list of the LaTEX control sequences for fonts that require italic corrections.

   LaTeX-standard-list-environments is a list of LaTEX environments

which can have ‘\item’ entries.

LaTeX-standard-options is a list of options that can go in the square brackets of the ‘\documentstyle’ command. It is used by make-LaTeX-

document and make-SLiTeX-document.

LaTeX-standard-styles is a list of styles that can go in the braces of

the ‘\documentstyle’ command. It is used by make-LaTeX-document.
   LaTeX-standard-unindented-environments is a list of environments

that must not be indented.

Variables beginning with the reserved prefix internal- are for internal use only; they are subject to change without warning, and will not be documented here.

1.19 Customizing lists

It is undesirable for users to have to duplicate the long initializations of standard fonts, macros, environments, and so on, when all they want to do is add a few more items to the lists.

Therefore, for each variable LaTeX-standard-xxx, there is a corresponding variable LaTeX-extra-xxx that is intended for user customization. The extra values are appended to the standard ones to make new lists that are used for command completion. Here are the names of these

customization variables: LaTeX-extra-counters, LaTeX-extra-dotted-
abbreviations,  LaTeX-

extra-environments, LaTeX-extra-fonts, LaTeX-extra-italic-fonts,
LaTeX-extra-list-environments, LaTeX-extra-macros, LaTeX-extra-
options, LaTeX-extra-styles, LaTeX-extra-tied-abbreviations, and
LaTeX-extra-unindented-environments.

Suppose for example that you want to add new environments named ‘conjecture’, ‘postulate’, and ‘wildguess’ to the standard list used by

LaTeX-begin-end-block. In the LaTeX-mode-hook in your ‘.emacs’ file,

add this assignment:

(setq LaTeX-extra-environments
      '(
        ("conjecture")
        ("postulate")
        ("wildguess")
        )
      )

When you subsequently type C-c b, these three new names will appear in the environment name completion list. Such lists are automatically alphabetized during the completion process, so the names can be given in any order in the assignment.

There is no provision for deleting names from the standard lists; after all, they are standard! Also, remember that the new additions are made known only to Emacs; you still have to teach LaTEX how to typeset them.

You may have wondered in the example above why I wrote ‘("conjecture")’ instead of just ‘"conjecture"’ in the assignment of LaTeX-extra-environments. The extra parentheses make a list out of each element in the variable. In ‘latex.el’, all variables that hold multiple strings store them as lists of lists of strings, rather than as simpler lists of strings. This choice was intentional, because it facilitates adding additional related strings in the form of Lisp association lists.

   The variables LaTeX-extra-environments, LaTeX-extra-macros,
LaTeX-standard-environments, and LaTeX-standard-macros already

use association lists to hold trailing braces and brackets, and descriptive comments.

SliTEX support

SLiTEX works much like LaTEX, so little additional support is required. All of the commands in the preceding sections can be used, and the editing mode is still called LaTeX-mode.

When you select a new SLiTEX file to edit, you can create an initial template with make-SLiTeX-document on C-c s. It prompts only for document style options, since the major style is fixed at ‘slides’, and produces something like this:

% -*-latex-*-
% Document name: /u/beebe/tex/tugboat/foo.stx
% Creator: Nelson Beebe [beebe@math.utah.edu]
% Creation Date: Mon Jul 29 08:15:15 1991
\documentstyle[]{slides}
\begin{document}
  \onlyslides{1-9999}
  \onlynotes{1-9999}
% \colors{} % {red,green,blue,etc.} colors
% \colorslides{} % input file
  \blackandwhite{<cursor>} % input file
\end{document}

The cursor is left positioned in the brace pair of the ‘\blackandwhite{}’ macro, where you can type the name of another file that you can create in LaTeX-mode, using ‘slide’ environments generated by C-c b sli<space>

RETurn.

It is convenient to number each slide with a comment, so that you have the numbers available if you need them for the ‘\onlynotes’ and

‘\onlyslides’ commands. The function renumber-slides on C-c 0 mod-

ifies relevant commands in the buffer to read something like this:

  \begin{slide}{} % slide number 1
...
  \begin{slide}{} % slide number 2
...
  \begin{overlay}{red} % overlay number 2-a
...
  \begin{overlay}{green} % overlay number 2-b
...
  \begin{note} % note number 2-1
...
  \begin{slide}{} % slide number 3
...
  \begin{note} % note number 3-1
...
  \begin{note} % note number 3-2

Any existing comments on the commands are discarded. Notice the special handling accorded the SLiTEX ‘note’ and ‘overlay’ environments; they receive a major number equal to that of the closest preceding slide, followed by a hyphen and a minor number or letter [14, pp. 136–137].

The Emacs variable SLiTeX-begin-slide defines the regular expression used to find the start of the ‘note’, ‘overlay’, and ‘slide’ environments.

Letter support

LaTEX [14, pp. 66ff] provides a ‘letter’ document style, but there is a fair amount of constant ‘boilerplate’ that has to be typed each time you use it. This suggests that the best approach is to have private template files that already have a letter outline in them, and then arrange to start each letter with a copy of the template already inserted into the buffer. Emacs’ programmability makes this straightforward.

The startup file code in Table 1 loads a small Lisp file, ‘letter.el’. It defines a letter-mode function, and associates it with files with extension ‘.ltr’. If I then visit a new file ‘rb-jones.ltr’, I immediately get the buffer shown in Table 8, with the cursor positioned in the empty brace pair in ‘\begin{letter}{}’, ready for entry of the address. The query in ‘\opening{Dear ?}’ is a reminder to enter something there, and then the body of the letter can be typed in following the ‘\opening’ line.

My personal style option ‘nhfb-letter’ provides for a University and Department letterhead on the first page, and defines a few private macros that I often need in my correspondence.

Once the letter file has been saved, I suspend Emacs, or switch to another workstation window, and then process the letter by typing

make LET=rb-jones

The UNIX ‘make’ utility is a wonderful tool; here it directs the execution of commands to expand tabs to blanks, changes the file protection to remove access to all but its owner, runs LaTEX, and then runs a PostScript DVI driver, sending the output to a nearby printer. Then it sends the output PostScript through a shell filter that modifies the ‘showpage’ command to print the string File Copy in outline letters diagonally across each page,

% -*-LaTeX-*-
% Document name: /u/beebe/rb-jones.ltr
% Creator: Nelson Beebe [beebe@math.utah.edu]
% Creation Date: Mon Jul 29 20:06:18 1991
%---------------------------------------------
% EVERYTHING TO THE RIGHT OF A  %  IS A REMARK
% TO YOU AND IS IGNORED BY LaTeX.
%
% WARNING!  DO NOT TYPE ANY OF THE FOLLOWING
% 10 CHARACTERS AS NORMAL TEXT CHARACTERS:
%       &   $   #   %   _{   }   ^~   \
%
% The following seven are printed by typing a
% backslash in front of them:
%       $  &  #  %  _{  and  }.
%---------------------------------------------
\documentstyle[nhfb-letter]{letter}
\begin{document}
\setfilename{foo.info}
\begin{letter}{<cursor>}
\opening{Dear ?}
\closing{Sincerely,}
\ps{{$\cal NHFB$}/\LaTeX}
\end{letter}
\end{document}

Table 3.1: Letter template. and queues that to the printer as well. On those occasions where I require multiple copies of the original letter, I just type something like

make LET=rb-jones C=3

This gives me one file copy, and three originals for signing and mailing.

With this support, preparation of typeset letters is just as easy as typewritten ones, and the result looks much better. And I can use mathematics and a variety of fonts too!

42 CHAPTER 3. LETTER SUPPORT

Bug reporting

LaTeX-gripe on C-c g makes it easy to complain about LaTeX-mode; it puts you in an e-mail buffer with a mail header something like this:

To: beebe@math.utah.edu
Subject: LaTeX-mode gripe report {beta test 0.23 [08-May-1991]}

The standardized subject field makes it easy for the author to identify such messages in his voluminous e-mail correspondence, and also automatically identifies the code version.

If you don’t have an electronic mail connection yet, you probably soon will. For now, just send me your comments in postal mail. Machinereadable submissions can be sent on IBM PC or Apple Macintosh floppy disks.

44 CHAPTER 4. BUG REPORTING

Conclusion

LaTeX-mode editing support in GNU Emacs provides a very powerful, and pleasant, way to prepare LaTEX and SLiTEX input.

The original TOPS-20 version written in TECO was begun in October 1984, and used extensively at Utah until our DEC-20/60 retired on October 31, 1990. It consists of about 1000 lines of code defining 24 functions.

The power of Lisp over TECO made it possible to be much more ambitious in the functionality of the GNU Emacs version, and I consequently suspended further development of the TECO code in January 1988 when I began the Lisp coding. The current Lisp version is more than 4 times the size of the TECO one, both in lines of code, and in editing functions. Despite the increase in size, it is much easier to maintain.

The GNU Emacs implementation was released for beta testing in March, 1988. About 70 sites have participated in the beta test of ‘latex.el’. I thank these many people for their contributions of comments, and sometimes, even code.

Is it bug free? No computer program for a realistic problem ever is; there are simply too many details for humans ever to get completely right. The ‘latex.el’ revision history shows mostly additions of new functionality, and code changes for better performance. The virtue of the Emacs editing environment is that new functions can be written, debugged, and tested in the editor itself, providing immediate feedback and confidence in the correctness of operation.

Much of the code is in small functions that are independent of the others, following the Lisp programming tradition. After removal of comments and empty lines, and ignoring the initializations of large tables, the average is about 22 lines of code and documentation per function. This is close to the 20-line average for all of GNU Emacs. Documentation contributions are included here because Emacs functions, and some variables, carry their own documentation with them, even after compilation. That documentation is readily available for viewing in the editor.

I believe that this code could serve as a model for other Emacs-like editors that have an extension language in which new functions can be written. I had planned to write an EEL version for the ‘epsilon’ editor on PC DOS, but alas, have not found the time to do so. This is not a small job, but it should be straightforward for someone familiar with both Lisp and EEL. The ‘latex.el’ file is over 4200 lines long, with about 155KB of text; Emacs compiles it into about 100KB of byte codes. The latter figure should give some idea of the memory requirements for implementations in other editors. I hope some reader will prepare such a translation and make it freely available, as ‘latex.el’ is. A large portion of the TEX community uses personal computers that are inadequate for GNU Emacs, but have smaller Emacs-like editors available, and such editing support would be a great boon for them.

If you plan to undertake such a translation effort, check with the author of ‘latex.el’ first to find out if anyone else is already working on one.

Some other work in the TEX community for editing support has been reported in the TEX User Group TEXniques series [16, 17, 20] and in TUGboat [7, 8, 9, 10, 11, 12, 21]. I believe that ‘latex.el’ is much more powerful, however.

Those who use UNIX workstations or VMS systems where GNU Emacs is already available should eventually find ‘latex.el’ in the ‘emacs/lisp’ directory, and until then, can obtain it directly from the author, provided they have Internet electronic mail or ‘ftp’ access.

If you have a UNIX or VMS system, but do not yet have GNU Emacs, you can get Emacs from any site that already has it, or better, you can get the latest version directly from the Free Software Foundation. The latter is accessible either via Internet anonymous ‘ftp’ to the machine ‘prep.ai. mit.edu’, or through postal mail to

Free Software Foundation, Inc.

675 Massachusetts Ave Cambridge, MA 02139 USA

The postal mail approach carries some shipping and documentation charges, but the software itself is free.

Bibliography

[1] James Alexander. Tib: a reference setting package for TEX. TUGBoat, 7(3):138, October 1986.

[2] James Alexander. Tib: a reference setting package, update. TUGBoat, 8(2):102, July 1987.

[3] R. L. Aurbach. User’s guide to the IdxTEX program. TEXniques, Publications for the TEX community, (3):i, 1–14, 1987.

[4] J. L. Bentley and B. W. Kernighan. Tools for printing indexes. Electronic Publishing—Origination, Dissemination, and Design, 1(1):3–18, April 1988.

[5] Pehong Chen and Michael A. Harrison. Automating index preparation. Technical Report 87/347, Computer Science Division, University of California, Berkeley, CA, USA, March 1987. This is an expanded version of [6].

[6] Pehong Chen and Michael A. Harrison. Index preparation and processing. Software—Practice and Experience, 19(9):897–915, September 1988. The LaTEX text of this paper is included in the makeindex software distribution.

[7] Adrian Clark. An enhanced TEX-editor interface for VMS. TUGBoat, 10(1):14–15, April 1989.

[8] Victor Eijkhout. A new editor. TUGBoat, 11(4):605, November 1990.

[9] A. Hoenig and M. Pfeffer. TEX text editors for the IBM PC. TUGBoat, 7(1):51, March 1986.

[10] Anita Z. Hoover. Using WordPerfect 5.0 to Create TEX and LaTEX Documents. TUGBoat, 10(4):549–559, December 1989.

[11] Kathy Hornbach. VAX Language Sensitive Editor Templates and Guide for use with LaTEX. TUGBoat, 7(2):99, June 1986.

[12] Karl Kleine. Customized editors for TEX. TUGBoat, 7(2):111, June 1986.

[13] Donald E. Knuth. The TEXbook. Addison-Wesley, 1984.

[14] Leslie Lamport. LaTEX—A Document Preparation System—User’s Guide and Reference Manual. Addison-Wesley, 1985.

[15] Leslie Lamport. makeindex: An Index Processor For LaTEX, 17 February 1987. The LaTEX text of this paper is included in the makeindex software distribution.

[16] Kent McPherson. VAX Language-Sensitive Editor (LSEDIT) Quick Reference Guide. TEXniques, Publications for the TEX community, (1):ii, 1–9, 1988.

[17] Paul M. Muller. FASTEX: A PC text editor and front-end for TEX. TEXniques, Publications for the TEX community, (7):235–254, 1988.

[18] Rainer Schöpf. A new implementation of the LaTEX verbatim and verbatim* environments. TUGBoat, 11(2):284–296, June 1990.

[19] Margaret Shertzer. The Elements of Grammar. Collier Books, Macmillan Publishing Company, 1986.

[20] Stephan von Bechtolsheim. Using the Emacs editor to safely edit TEX sources. TEXniques, Publications for the TEX community, (7):195–202, 1988.

[21] Linda Williams and Linda Hall. Increased efficiency using advanced EDT editing features. TUGBoat, 11(3):421–424, September 1990.

Concept Index

.

.aux file . . . . . . . . 28, 31, 32 .emacs file . . . . . 3, 4, 17, 28, 36 .ltr file . . . . . . . . . . . . . 39 .ltx file . . . . . . . . . . . . 3 .stx file . . . . . . . . . . . . 3 .sty file . . . . . . . . . . 3, 15 .tex file . . . . . . . . . . . . 3

\

\TeX book . . . . . . . . . . . 27 \TeX{}book . . . . . . . . . . 27

<

<< … >> . . . . . . . . . . . . 33

A

abbreviation . . . . . 21, 22, 23, 27 angle bracket . . . . . . . . . . 33 apostrophe . . . . . . . . . . . 23 Apple Macintosh . . . . . . . . 43 art10.sty . . . . . . . . . . . . 15 association list . . . . . . . . . 36

B

backslash . . . . . . . 20, 25, 26 beta test . . . . . . . . . . . . 45 BibTEX . . . . . . . . . . . . 28 bibliography . . . . . . . . . . 28 boilerplate . . . . . . . . . . . 39 buffer overflow . . . . . . . 24, 34 bug report . . . . . . 8, 10, 35, 43 bug reporting . . . . . . . . . . 43

C

caret . . . . . . . . . . . . . 21 closing apostrophe . . . . . . . 23 code size . . . . . . . . . . . . 45 code version . . . . . . . . . . 43 comma . . . . . . . 21, 22, 23, 24 command completion . . . . . 12,

16, 17, 32, 33, 35, 36

comment . . . . . . . . . . . . 24 complaint . . . . . . 8, 10, 35, 43 completion . 12, 16, 17, 32, 33, 35, 36 concept index . . . . . . . . . 49 control sequence index . . . . . . 53 conventions for naming . . 5, 34, 35 counter name . . . . . . . . . . 33 creating a new LaTEX file . . . . . 12 cross-references . . . . . . . . . 30 cursor …. 14, 16, 18, 19, 20, 21,

26, 28, 29, 34, 37, 39

cursor column . . . . . . . . . 34 cursor flash . . . . . . . . . . 25 customization . . . . . . . . . 35

D

date of revision . . . . . . . 35, 43 DEC-20 . . . . . . . . . . . . 45 delimiter mismatch . . . . . . . 25 display math . . . . . . . . 19, 20 documentation of function . . 5, 45 dollar sign . . . . . . 19, 20, 21, 26 dot . . . . . . . . . . . . . . 21

E

e-mail …. 7, 8, 14, 27, 35, 43, 46 edit-abbrevs . . . . . . . . . . 27 EEL . . . . . . . . . . . . . . 46 ellipsis . . . . . . . . . . . . . 21 em-dash (—) . . . . . . . . . . 33 end of sentence . . . . . . . 21, 22 English typography . . . . . . . 32 environment . . . . . . . . . . 17

forgotten . . . . . . . . . . 19 mismatch . . . . . . . . . . 26 private . . . . . . . . . . . 18

epsilon editor . . . . . . . . . . 46

F

file copy . . . . . . . . . . . . 39 file extensions . . . . . . . 3, 39 floppy disk . . . . . . . . . . . 43 font change . . . . . . . . . . 23 footnote . . . . . . . . . . . . 33 fragile command . . . . . . . . 34 Free Software Foundation …. 46 French typography . . . . . . . 32 french.sty . . . . . . . . . . . 33 full stop . . . . . . . . . . . . 21 function documentation … 5, 45 function index . . . . . . . . . 55

G

gnats and gnus . . . . . . . 15, 29 GNU Emacs

getting . . . . . . . . . . . 46 grave accent . . . . . . . . . . 23 gripe . . . . . . . . 8, 10, 35, 43 guillemet . . . . . . . . . . . 33 GUTenberg . . . . . . . . . . 33

H

Halloween . . . . . . . . . . . 45 highlighter pen . . . . . . . . . 29 history of revisions . . . . . 34, 45 hook . . . . . . 17, 28, 33, 34, 36 hostname . . . . . . . . . . . 14

I

IBM PC . . . . . . . . . . 43, 46 index

concept . . . . . . . . . . . 49 control sequence . . . . . . . 53 function . . . . . . . . . . 55 key . . . . . . . . . . . . 59 person . . . . . . . . . . . 61 variable . . . . . . . . . . . 63 indexing . . . . . . . . . . . . 29 initial . . . . . . . . . . . . . 21 inline comment . . . . . . . . . 24 inline math . . . . . . . . 19, 20 internal functions . . . . . . . . 34 internal variables . . . . . . . . 35 italic correction . . . . . . . 22, 23

K

key binding . . 5, 10, 11, 25, 27, 32 key index . . . . . . . . . . . 59 key map . . . . . . . . . . . . 35

L

labels checking validity of . . . . . . 31 in multi-file documents …. 31 in use . . . . . . . . . 30, 32 missing . . . . . . . . . . . 31 letter . . . . . . . . . . . . . 39 letterhead . . . . . . . . . . . 39 licensing information . . . . . . 1 Lisp

character quote . . . . . . . 34 GNU Emacs 3, 17, 34, 39, 45, 46 GNU Emacs, executing …. 17 programming tradition …. 45 literal . . . . . . . . . . . 21, 23 login name . . . . . . . . . . . 14 lplain.tex . . . . . . . . . . . 27

M

Macintosh . . . . . . . . . . . 43 macros . . . . . . . . . . . . 16 common . . . . . . . . . . 19 private . . . . . . 17, 29, 31, 39

mail electronic . 7, 8, 14, 27, 35, 43, 46 postal . . . . . . . . . . . 46 make utility . . . . . . . . . . 39 makeindex utility . . . . . . 29, 34 map of keys . . . . . . . . . . 35 mark stack . . . . . . . . . . . 25 math mode . . . . . . . . . 19, 25 minibuffer . . . . . . . . . 17, 34 mismatch

of delimiter . . . . . . . . . 25 of environment . . . . . . . 26

mode hook . . . . . . . 17, 28, 34 mode line . . . . . . . . . . . 33 mouse . . . . . . . . . . . . . 29

N

name prefix . . . . . . . 5, 34, 35 naming conventions …. 5, 34, 35 nesting check . . . . . . . . . . 26 nesting error . . . . . . . . . . 26 nesting level . . . . . . 18, 26, 34 news . . . . . . . . . . . . . 34 note environment . . . . . . . . 38

O

opening apostrophe . . . . . . . 23 option … 12, 15, 16, 24, 35, 37, 39 outline letters . . . . . . . . . 39 overflow of buffer . . . . . . 24, 34 overlay environment . . . . . . . 38

P

PC . . . . . . . . . . . . 43, 46 PC DOS . . . . . . . . . . . . 46 period . . . . . . . . . . . . . 21 person index . . . . . . . . . . 61 personal name . . . . . . . . . 14 plain.tex . . . . . . . . . . . . 27 plus sign . . . . . . . . . . . . 34 PostScript . . . . . . . . . . . 39 prefix command . . . . . . . . 10 prefix in names . . . . . . 5, 34, 35 problem report …. 8, 10, 35, 43 protecting arguments . . . . . . 34 punctuation . . . . . . . . . . 27

Q

query . . . . . . . . 12, 16, 32, 39 quotation mark . . . . . . . 21, 23

R

recursive edit . . . . . . . . . . 31 regular expression …. 24, 31, 38 reporting bugs …. 8, 10, 35, 43 revision date . . . . . . . . 35, 43 revision history . . . . . . . 34, 45

S

scope of names . . . . . . . . . 5 sentence end . . . . . . . . 21, 22 set-variable . . . . . . . . . . . 34 showpage . . . . . . . . . . . 39 SLiTEX . . . . . . . . . . . . 37 slide environment . . . . . . . . 37 space . . . . . . . . . 12, 16, 27 trailing . . . . . . . . . . . 27 visible . . . . . . . . . . . 34 startup file . . . . . 3, 4, 17, 28, 36 style file . . . . . . . 12, 15, 24, 33 subscript . . . . . . . . . . . . 21 superscript . . . . . . . . . . . 21

T

TECO . . . . . . . . . . . . . 45 template file . . . . . . . . . . 39 texindex utility . . . . . . . . . 29 Tib . . . . . . . . . . . . . . 28 tie . . . . . . . . . . 22, 32, 33 tilde . . . . . . . . . . . . . . 22 TOPS-20 . . . . . . . . . . . 45 TUGboat . . . . . . . . . . . 46 typography

English . . . . . . . . . . . 32 French . . . . . . . . . . . 32

U

underscore . . . . . . . . . . . 21 UNIX . . . . . . . . . . . . . 46

V

variable index . . . . . . . . . 63 variables . . . . . . . . . . . . 35 version number . . . . . . . . . 35 version of code . . . . . . . . . 43 vertical bar . . . . . . . . . . 34 visibility of names . . . . . . . . 5 VMS . . . . . . . . . . . . . 46

W

word abbreviation . . . . . . . . 27

X

X Window System . . . . . . . 29

Control Sequence Index

$

$ ... $ . . . . . . . . . . . . . 20 $$ ... $$ . . . . . . . . . . . . 20

\

{\TeX} . . . . . . . . . . . . 27 \( . . . . . . . . . . . . . . 20 \) . . . . . . . . . . . . . . 20 \/ . . . . . . . . . . . . . . 22 \@ . . . . . . . . . . . . 21, 22 \[ . . . . . . . . . . . . . . 20 \<space> . . . . . . . 21, 22, 27 \] . . . . . . . . . . . . . . 20 \^^M . . . . . . . . . . . . . 27

\abovedisplayshortskip . . . . 17

\adss . . . . . . . . . . . . . 17 \begin . . . . . . . . 6, 7, 19, 38 \begin{...} … 17, 19, 20, 26, 34

\begin{conjecture} . . . . . . 19
\begin{displaymath} . . . . . . 21
\begin{document} . . 14, 15, 37, 39
\begin{equation} . . . . . . . 21
\begin{itemize} . . . . . . . . 18
\begin{letter}{} . . . . . . . 39
\begin{quote} . . . . . . . 18, 26
\begin{slide}{} . . . . . . . . 38
\begin{verbatim} . . . . . . . 18
\begin{verse} . . . . . . . . . 26

\bibdata . . . . . . . . . . . 28

\bibitem[]{} . . . . . . . . . 28

\bibitem{} . . . . . . . . . . 28

\bibliography . . . . . . . . . 28
\blackandwhite{} . . . . . . . 37

\bootnote{} . . . . . . . . . . 34 \cal . . . . . . . . . . . . . 39 \cdots . . . . . . . . . . . . 21 \cite . . . . . . . . . . . . . 28 \cite[]{} . . . . . . . . . . . 28 \cite{} . . . . . . . . . . . . 28 \closing . . . . . . . . . . . 39 \colors . . . . . . . . . . . . 37

\colorslides . . . . . . . . . 37

\comment . . . . . . . . . . . 24 \ddots . . . . . . . . . . . . 21 \def . . . . . . . . . . . . . 24 \documentstyle 14, 15, 31, 35, 37, 39 \em . . . . . . . . . . . . . . 23 \end . . . . . . . . . . 6, 7, 19 \end{...} …. 17, 19, 20, 26, 34

\end{conjecture} . . . . . . . 19
\end{displaymath} . . . . . . . 21
\end{document} . . . 14, 15, 37, 39
\end{equation} . . . . . . . . 21
\end{itemize} . . . . . . . . . 18
\end{letter} . . . . . . . . . 39

\end{quote} . . . . . . . . 18, 26

\end{verbatim} . . . . . . . . 18

\end{verse} . . . . . . . . . . 26 \FIGREF . . . . . . . . . . . . 31 \flqq . . . . . . . . . . . . . 33 \footnote{} . . . . . . . . . . 33

\frenchspacing . . . . . . . . 32

\frqq . . . . . . . . . . . . . 33 \FUNCTION{} . . . . . . . . . . 29 \index . . . . . . . . . 9, 29, 34 \it . . . . . . . . . . . . . . 23 \item . . . . . . . . . 18, 19, 35 \item[] . . . . . . . . . . . . 19 \label . . . . . . . 19, 30, 31, 32 \ldots . . . . . . . . . . . . 21

54 CONTROL SEQUENCE INDEX

\long . . . . . . . . . . . . . 24

\longrightarrow . . . . . . . . 16

\newcommand … 14, 15, 24, 37, 39 \newlabel . . . . . . . . . . . 31 \onlynotes . . . . . . . . 7, 37 \onlyslides . . . . . . . 7, 37, 38 \opening . . . . . . . . . . . 39

\opening{Dear ?} . . . . . . . 39

\pageref . . . . . . . . . 30, 31 \PAGEREF . . . . . . . . . . . 31 \protect . . . . . . . . . 27, 34 \ps . . . . . . . . . . . . . . 39 \ref . . . . . . . . . . . 30, 31 \sl . . . . . . . . . . . . . . 23 \TeX{} . . . . . . . . . . . . 27

\TeX{} vs. \TeX\ . . . . . . . 27
\TeX\<space> . . . . . . . . . 27

\vdots . . . . . . . . . . . . 21 \verb*|...| . . . . . . . . . . 34 \verb|...| . . . . . . . . . . 34 \X . . . . . . . . . . . . 15, 29

\X{gnats and gnus} . . . . . . 15
"

" . . . . . . . . . . . . . . . 10 "< . . . . . . . . . . . . . . 33 "> . . . . . . . . . . . . . . 33

L

latex to \LaTeX{} . . . . . . . 27

T

tex to \TeX{} . . . . . . . . . . 27

Function Index

A

autoload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 5

B

backward-up-list . . . . . . . . . . . . . . . . . . . . . . . . . . 11

C

check-LaTeX-labels . . . . . . . . . . . . . . . . . . . . . . . . 7, 31 check-LaTeX-nesting . . . . . . . . . . . . . . . . . . . . . . . . 8

D

describe-bindings . . . . . . . . . . . . . . . . . . . . . . . . . . 5 describe-function . . . . . . . . . . . . . . . . . . . . . . . . . . 5 describe-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 describe-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

E

emacs-lisp-mode . . . . . . . . . . . . . . . . . . . . . . . . . . 17 eval-expression . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 exchange-point-and-mark . . . . . . . . . . . . . . . . . . . . . . 26

F

forward-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 French-LaTeX-mode . . . . . . . . . . . . . . . . . . . . . . . . . 33

G

global-set-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

I

if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 indent-LaTeX-begin-end-groups . . . . . . . . . . . . . . . . . . . . 8 internal- (reserved prefix) . . . . . . . . . . . . . . . . . . . . . . 34

L

lambda . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 28 LaTeX-add-word-to-index . . . . . . . . . . . . . . . . . . . 6, 10, 29 LaTeX-angles . . . . . . . . . . . . . . . . . . . . . . . . . 7, 11, 25 LaTeX-begin-end-block . . . . . . . . . . . . . . . 6, 10, 18, 21, 35, 36 LaTeX-bibitem . . . . . . . . . . . . . . . . . . . . . . . . 6, 11, 28 LaTeX-bibtag-with-completion . . . . . . . . . . . . . . . . . . . . 28 LaTeX-braces . . . . . . . . . . . . . . . . . . . . . . . . 7, 10, 25 LaTeX-brackets . . . . . . . . . . . . . . . . . . . . . . . . 7, 10, 25 LaTeX-check-angle-balance . . . . . . . . . . . . . . . . . . . 7, 11, 25 LaTeX-check-brace-balance . . . . . . . . . . . . . . . . . 7, 10, 11, 25 LaTeX-check-bracket-balance . . . . . . . . . . . . . . . . 7, 10, 11, 25 LaTeX-check-dollar-balance . . . . . . . . . . . . . . . . . . 7, 11, 25 LaTeX-check-parenthesis-balance . . . . . . . . . . . . . . . . 7, 11, 25 LaTeX-cite . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 28 LaTeX-comma . . . . . . . . . . . . . . . . . . . . . . . . . 10, 23 LaTeX-comment . . . . . . . . . . . . . . . . . . . . . . . 8, 11, 24 LaTeX-counter . . . . . . . . . . . . . . . . . . . . . . . . . 10, 33 LaTeX-displaymath . . . . . . . . . . . . . . . . . . . . . . . 11, 21 LaTeX-dollar . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 20 LaTeX-dot . . . . . . . . . . . . . . . . . . . . . . . . . 10, 21, 22 LaTeX-end . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 10, 19 LaTeX-equation . . . . . . . . . . . . . . . . . . . . . . . . 10, 21 LaTeX-font-bf . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-font-em . . . . . . . . . . . . . . . . . . . . . . . . 8, 11, 23 LaTeX-font-it . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-font-rm . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-font-sc . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-font-sf . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-font-sl . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-font-tt . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11 LaTeX-footnote . . . . . . . . . . . . . . . . . . . . . . . . 6, 10, 33 LaTeX-French-colon . . . . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-French-exclamation . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-French-langle . . . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-French-minus . . . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-French-query . . . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-French-rangle . . . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-French-semicolon . . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-gripe . . . . . . . . . . . . . . . . . . . . . . . 8, 10, 35, 43 LaTeX-index . . . . . . . . . . . . . . . . . . . . . . . 5, 6, 9, 10, 29 LaTeX-item . . . . . . . . . . . . . . . . . . . . . . . . . 6, 10, 19 LaTeX-label . . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 10 LaTeX-macro . . . . . . . . . . . . . . . . . . . . 7, 10, 16, 17, 19, 23 latex-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 LaTeX-mode . . . . . . . . . . . . . . . . . . . . . . . . . 1, 3, 4, 5,

14, 15, 17, 18, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 37, 43, 45

LaTeX-news . . . . . . . . . . . . . . . . . . . . . . . . . . 11, 34 LaTeX-pageref . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 LaTeX-pageref-with-completion . . . . . . . . . . . . . . . . . 6, 10, 32 LaTeX-parentheses . . . . . . . . . . . . . . . . . . . . . . 7, 11, 25 LaTeX-protect . . . . . . . . . . . . . . . . . . . . . . . . 6, 11, 34 LaTeX-quote . . . . . . . . . . . . . . . . . . . . . . . . 10, 23, 33 LaTeX-ref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 LaTeX-ref-with-completion . . . . . . . . . . . . . . . . . . . 6, 10, 32 LaTeX-set-indentation . . . . . . . . . . . . . . . . . . . . . . 10, 34 LaTeX-subscript . . . . . . . . . . . . . . . . . . . . . . . . . . 21 LaTeX-superscript . . . . . . . . . . . . . . . . . . . . . . . . . 21 LaTeX-tab . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 11, 34 LaTeX-to-begin . . . . . . . . . . . . . . . . . . . . . . . . 7, 10, 19 LaTeX-to-end . . . . . . . . . . . . . . . . . . . . . . . . 7, 10, 19 LaTeX-uncomment . . . . . . . . . . . . . . . . . . . 6, 8, 10, 24, 25 LaTeX-verb . . . . . . . . . . . . . . . . . . . . . . . . . 6, 10, 34 letter-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 list-abbrevs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 4, 5 local-set-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

M

make-LaTeX-document . . . . . . . . . . . . . . . . . 6, 10, 12, 14, 35 make-SLiTeX-document . . . . . . . . . . . . . . . . . . 6, 10, 35, 37

N

newline-and-indent . . . . . . . . . . . . . . . . . . . . . . . . . 10

Q

quoted-insert . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 23

R

renumber-slides . . . . . . . . . . . . . . . . . . . . . . . . 7, 10, 38 repeat-complex-command . . . . . . . . . . . . . . . . . . . . . . 26

S

self-insert-command . . . . . . . . . . . . . . . . . . . . . . . 20, 33 show-LaTeX-bibtags . . . . . . . . . . . . . . . . . . . . . . . . . 28 show-LaTeX-labels . . . . . . . . . . . . . . . . . . . . . . 5, 7, 30

T

tex-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 5

U

undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 up-list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 update-LaTeX-bibtags . . . . . . . . . . . . . . . . . . . . . . 28, 29 update-LaTeX-labels . . . . . . . . . . . . . . . . . . . . . 7, 31, 32

X

x-LaTeX-index-end . . . . . . . . . . . . . . . . . . . . . . . . . 29 x-LaTeX-index-start . . . . . . . . . . . . . . . . . . . . . . . . . 29

Key Index

$

$ . . . . . . . . . . . . . . . 10

,

, . . . . . . . . . . . . . . . 10

.

. . . . . . . . . . . . . . . . 10

?

? . . . . . . . . . . 12, 16, 32, 39

ˆ

ˆ . . . . . . . . . . . . . 10, 21

_

_. . . . . . . . . . . . . 10, 21

"

" . . . . . . . . . . . . . . . 10 "< . . . . . . . . . . . . . . 33 "> . . . . . . . . . . . . . . 33

<

<< . . . . . . . . . . . . . . 33

>

>> . . . . . . . . . . . . . . 33

C

C-c . . . . . . . . . . . . . . 10 C-c $ . . . . . . . . . . . 10, 25 C-c % . . . . . . . . . . . 10, 24 C-c ( . . . . . . . . . . . 10, 25 C-c ) . . . . . . . . . . . 10, 25 C-c , . . . . . . . . . . . . . 34 C-c . . . . . . . . . . . . 10, 29 C-c = . . . . . . . . . . . 10, 21 C-c [ . . . . . . . . . . . 10, 25 C-c ] . . . . . . . . . . . 10, 25 C-c < . . . . . . . . . . . 10, 25 C-c > . . . . . . . . . . . 10, 25 C-c 0 . . . . . . . . . . . 10, 38 C-c a . . . . . . . . . . . 10, 19 C-c b …. 10, 18, 19, 21, 36, 37 C-c c . . . . . . . . . . . 10, 28 C-c C . . . . . . . . . . . . . 28 C-c C-b . . . . . . . . . . 10, 28 C-c C-c . . . . . . . . . . . . 10 C-c C-c $ . . . . . . . . . . . 11 C-c C-c ) . . . . . . . . . . . 11 C-c C-c = . . . . . . . . . 11, 21 C-c C-c ] . . . . . . . . . . . . 11 C-c C-c b . . . . . . . . . . . 11 C-c C-c e . . . . . . . . . 11, 23 C-c C-c f . . . . . . . . . . . . 11 C-c C-c i . . . . . . . . . . . . 11 C-c C-c r . . . . . . . . . . . 11 C-c C-c s . . . . . . . . . . . 11 C-c C-c t . . . . . . . . . . . 11 C-c C-c u . . . . . . . . . . . 11 C-c C-k . . . . . . . . . . . . 10 C-c C-l . . . . . . . . . . . . 10 C-c C-n . . . . . . . . . . 10, 34 C-c C-p . . . . . . . . . . 10, 34 C-c C-q . . . . . . . . . . . . 10 C-c C-r . . . . . . . . . . . . 10 C-c d . . . . . . . . . . . 10, 12 C-c e . . . . . . . . . . . 10, 19 C-c f . . . . . . . . . . . 10, 33

60 KEY INDEX

C-c g . . . . . . . . . . . 10, 43 C-c i . . . . . . . . . . . 10, 19 C-c k . . . . . . . . . . . . . 33 C-c l . . . . . . . . . 10, 19, 30 C-c m . . . . . . . . . 10, 16, 23 C-c n . . . . . . . . . . . 10, 19 C-c p . . . . . . . . . 10, 30, 32 C-c r . . . . . . . . . 10, 30, 32 C-c s . . . . . . . . . . . 10, 37 C-c Tab . . . . . . . . . . 10, 34 C-c u . . . . . . . . . . . 10, 24 C-c v . . . . . . . . . . . 10, 34 C-c x . . . . . . . . . . . 10, 29 C-h b . . . . . . . . . . . . . 5 C-h d . . . . . . . . . . . . . 5 C-h k . . . . . . . . . . . . . 5 C-h m . . . . . . . . . . . . . 5 C-q . . . . . . . . . . . . . . 21 C-q $ . . . . . . . . . . . . . 21 C-q . . . . . . . . . . . . . . 23 C-q " . . . . . . . . . . . . . 23 C-u . . . . . . . . . . . . . . 16 C-x C-x . . . . . . . . . . . . 26 C-x ESCape . . . . . . . . . . 26

E

ESCape . . . . . . . . . . . . 10 ESCape ( . . . . . . . . . . . 10 ESCape ) . . . . . . . . . . . 10 ESCape ESCape . . . . . . . . 17

L

LFD . . . . . . . . . . . . . 10

M

M-( . . . . . . . . . . . . . . 10 M-) . . . . . . . . . . . . . . 10 M-a . . . . . . . . . . . . . . 19 M-e . . . . . . . . . . . . . . 19 M-x abbrev-mode . . . . . . . . 28 M-x check-LaTeX-nesting …. 26 M-x edit-abbrevs . . . . . . . . 27 M-x indent-LaTeX-begin-end-groups26 M-x LaTeX-mode . . . . . . . . 3 M-x load-file . . . . . . . . . . 17 M-x load-library . . . . . . . . 17 M-x set-variable . . . . . . 17, 34

R

RETurn . . . . . 12, 14, 16, 18, 37

Person Index

A

Alexander, James . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Aurbach, R. L. . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

B

Bentley, J. L. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

C

Chen, Pehong . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Clark, Adrian . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

E

Eijkhout, Victor . . . . . . . . . . . . . . . . . . . . . . . . . . 46

H

Hall, Linda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Harrison, Michael A. . . . . . . . . . . . . . . . . . . . . . . . . 29 Hoenig, Alan . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Hoover, Anita . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Hornbach, Kathy . . . . . . . . . . . . . . . . . . . . . . . . . . 46

K

Kernighan, B. W. . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Kleine, Karl . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Knuth, Donald. E. . . . . . . . . . . . . . . . . . . . . . 21, 22, 32

L

Lamport, Leslie . . . . . . . . . . . . . . 16, 21, 22, 28, 29, 32, 34, 38, 39

M

McPherson, Kent . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Muller, Paul M. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

62 PERSON INDEX

P

Pfeffer, M. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

S

Schoepf, Rainer . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Shertzer, Margaret . . . . . . . . . . . . . . . . . . . . . . . . . 22

V

von Bechtolsheim, Stephan . . . . . . . . . . . . . . . . . . . . 21, 46

W

Williams, Linda . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Variable Index

A

auto-mode-alist . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 4

B

BIBINPUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

F

French-LaTeX-mode-hook . . . . . . . . . . . . . . . . . . . . . . 33

I

internal- (reserved prefix) . . . . . . . . . . . . . . . . . . . . . . 35

L

LaTeX-angle-interval . . . . . . . . . . . . . . . . . . . . . . . . 26 LaTeX-aux-file-label-tags . . . . . . . . . . . . . . . . . . . . 31, 32 LaTeX-begin-end-indentation . . . . . . . . . . . . . . . . . . . . . 18 LaTeX-BIBINPUTS . . . . . . . . . . . . . . . . . . . . . . . . . 28 LaTeX-bibtags . . . . . . . . . . . . . . . . . . . . . . . . . 28, 29 LaTeX-brace-interval . . . . . . . . . . . . . . . . . . . . . . . . 26 LaTeX-bracket-interval . . . . . . . . . . . . . . . . . . . . . . . 26 LaTeX-comma-after-dotted-abbreviation . . . . . . . . . . . . . . . . 22 LaTeX-comment-prefix . . . . . . . . . . . . . . . . . . . . . . . 24 LaTeX-current-indentation . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-displaymath-option . . . . . . . . . . . . . . . . . . . . . . 20 LaTeX-dollar-interval . . . . . . . . . . . . . . . . . . . . . . . . 26 LaTeX-extra-counters . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-extra-dotted-abbreviations . . . . . . . . . . . . . . . 22, 23, 35 LaTeX-extra-environments . . . . . . . . . . . . . . . . . . . . . . 36 LaTeX-extra-fonts . . . . . . . . . . . . . . . . . . . . . . . . . . 36 LaTeX-extra-italic-fonts . . . . . . . . . . . . . . . . . . . . . . . 36 LaTeX-extra-list-environments . . . . . . . . . . . . . . . . . . . . 36 LaTeX-extra-macros . . . . . . . . . . . . . . . . . . . . . . . . . 36

64 VARIABLE INDEX

LaTeX-extra-options . . . . . . . . . . . . . . . . . . . . . . . . 36 LaTeX-extra-styles . . . . . . . . . . . . . . . . . . . . . . . . . 36 LaTeX-extra-tied-abbreviations . . . . . . . . . . . . . . . . . . 22, 36 LaTeX-extra-unindented-environments . . . . . . . . . . . . . . . . . 36 LaTeX-extra-xxx . . . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-footnote-end-with-newline . . . . . . . . . . . . . . . . . . . 34 LaTeX-footnote-start-with-newline . . . . . . . . . . . . . . . . . . 34 LaTeX-index-end-with-newline . . . . . . . . . . . . . . . . . . . 9, 30 LaTeX-index-macro . . . . . . . . . . . . . . . . . . . . . . . . . 29 LaTeX-index-start-with-newline . . . . . . . . . . . . . . . . . . . 9, 29 LaTeX-item-count . . . . . . . . . . . . . . . . . . . . . . . . . . 18 LaTeX-item-indentation . . . . . . . . . . . . . . . . . . . . . . . 18 LaTeX-item-info-indent . . . . . . . . . . . . . . . . . . . . . . . 18 LaTeX-label-definition . . . . . . . . . . . . . . . . . . . . . . . . 31 LaTeX-label-end-with-newline . . . . . . . . . . . . . . . . . . . . 32 LaTeX-label-reference . . . . . . . . . . . . . . . . . . . . . . . . 31 LaTeX-label-start-with-newline . . . . . . . . . . . . . . . . . . . . 32 LaTeX-math-option . . . . . . . . . . . . . . . . . . . . . . . . . 20 LaTeX-mode-abbrev-table . . . . . . . . . . . . . . . . . . . . . . 27 LaTeX-mode-hook . . . . . . . . . . . . . . . . . . . . . 17, 28, 36 LaTeX-mode-map . . . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-mode-version . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-newline-after-closing-delimiter . . . . . . . . . . . . . . . 17, 20 LaTeX-newline-after-opening-delimiter . . . . . . . . . . . . . . . 17, 20 LaTeX-parenthesis-interval . . . . . . . . . . . . . . . . . . . . . . 26 LaTeX-space-after-begin-end . . . . . . . . . . . . . . . . . . . . . 18 LaTeX-standard-counters . . . . . . . . . . . . . . . . . . . . . . 33 LaTeX-standard-dotted-abbreviations . . . . . . . . . . . . . . . 22, 23 LaTeX-standard-environments . . . . . . . . . . . . . . . . . . 35, 36 LaTeX-standard-fonts . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-standard-italic-fonts . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-standard-list-environments . . . . . . . . . . . . . . . . . . . 35 LaTeX-standard-macros . . . . . . . . . . . . . . . . . . . . . . . 36 LaTeX-standard-options . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-standard-styles . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-standard-tied-abbreviations . . . . . . . . . . . . . . . . . . 22 LaTeX-standard-unindented-environments . . . . . . . . . . . . . . . 35 LaTeX-standard-xxx . . . . . . . . . . . . . . . . . . . . . . . . 35 LaTeX-verb-delimiter . . . . . . . . . . . . . . . . . . . . . . . . 34

P

paragraph-separate . . . . . . . . . . . . . . . . . . . . . . . . . 24

S

SLiTeX-begin-slide . . . . . . . . . . . . . . . . . . . . . . . . . 38

VARIABLE INDEX 65

T

TEXINPUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15