You are on page 1of 2

AUCTEX Reference Card

(for version 11.86)

Save Document
Switch to master file or active buffer
Query for a master file

Conventions Used
Carriage Return or C-m
Tabular or C-i
Linefeed or C-j

RET
TAB
LFD

C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c

C-c
C-b
C-r
C-t C-r
C-k
C-l

C-t C-b
C-t C-w
C-v

Commands you can run on the master file (with C-c C-c) or the
region (with C-c C-r) include the following (starred versions
are not available in all modes):
TEX
LaTEX
ConTEXt (once)
ConTEXt Full
Makeinfo
Makeinfo with HTML output
Appropriate previewer
Print the output
BibTEX
MakeIndex
LaCheck
Make (PostScript) File
Ispell
Delete intermediate files
Delete all output files files

C-c C-d
C-c ^
C-c

All math mode commands are under the prefix key specified
by LaTeX-math-abbrev-prefix, default is .

*TeX
*LaTeX
*ConTeXt
*ConTeXt Full
*Makeinfo
*Makeinfo HTML
View
Print
BibTeX
Index
Check
File
Spell
Clean
Clean All

Insert Section
Insert LaTEX environment
Insert item
Insert item (alias)
Close LaTEX environment
Insert TEX macro \{}
Insert double brace
Complete TEX macro
Smart quote
Smart dollar

Greek Letters

Font Selection
Insert bold text
Insert italics text
Insert roman text
Insert emphasized text
Insert typewriter text
Insert slanted text
Insert Small Caps text
Delete font
Replace font

C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-u

C-f
C-f
C-f
C-f
C-f
C-f
C-f
C-f
C-c

C-b
C-i
C-r
C-e
C-t
C-s
C-c
C-d
C-f hkeyi

Source Formatting
Indent current line
Indent next line

TAB
LFD

Format
Format
Format
Format

M-q
C-c C-q C-r
C-c C-q C-s
C-c C-q C-e

a paragraph
a region
a section
an environment

Mark an environment
Mark a section

C-c .
C-c *

TEX runs can come in various types, which may be toggled and
are indicated in the mode line.

Comment or uncomment region


Comment or uncomment paragraph

C-c ;
C-c %

C-c C-t C-p


C-c C-t C-i
C-c C-t C-s
c 1987, 1992, 1993, 2004, 2005, 2008,
Copyright
2010 Free Software Foundation, Inc.
for AUCTEX version 11.86

Miscellaneous
Read AUCTEX manual
Math Mode
Reset Buffer
Reset AUCTEX

You can define your own math mode commands by setting the
variable LaTeX-math-list before loading LaTeX-math-mode.

C-c C-s
C-c C-e
C-c LFD
M-RET
C-c ]
C-c C-m
C-c {
M-TAB
"
$

TEXing options

PDF/DVI mode
Stop on errors (Interactive mode)
I/O correlation (S. Specials, SyncTEX)

Variables

Command Insertion

Shell Interaction
Run a command on the master file
Run a command on the buffer
Run a command on the region
Fix the region
Kill job
Recenter output buffer
Next error in TEX/LaTEX session
Toggle debug of bad boxes
Toggle debug of warnings
View output file

Math Mode

Multifile Handling

C-c
C-c
C-c
C-u

TAB
~
C-n
C-c C-n

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

(\alpha)
(\beta)
(\gamma)
(\delta)
(\epsilon)
(\zeta)
(\eta)
(\theta)
(\kappa)
(\lambda)
(\mu)
(\nu)
(\xi)
(\pi)
(\rho)
(\sigma)
(\tau)

a
b
g
d
e
z
h
j
k
l
m
n
x
p
r
s
t

C-f
C-b
C-p
C-n
<
>
~
N
I
A
E
/
i
*
.
{
}
[

(\upsilon)
(\phi)
(\chi)
(\psi)
(\omega)
(\Delta)
(\Gamma)
(\Theta)
(\Lambda)
(\Xi)
(\Pi)
(\Sigma)
(\Upsilon)
(\Phi)
(\Psi)
(\Omega)

u
f
q
y
w
D
G
Q
L
X
P
S
U
F
Y
W

h
i
exp
sin
cos
sup
inf
det
lim
tan
x

(\supseteq)
(\emptyset)
(\setminus)
(\cup)
(\cap)
(\langle)
(\rangle)
(\exp)
(\sin)
(\cos)
(\sup)
(\inf)
(\det)
(\lim)
(\tan)
(\hat)
(\vee)
(\wedge)

]
0
\
+
(
)
C-e
C-s
C-c
C-^
C-_
C-d
C-l
C-t
^
|
&

Symbols

(\rightarrow)
(\leftarrow)
(\uparrow)
(\downarrow)
(\leq)
(\geq)
(\tilde)
(\nabla)
(\infty)
(\forall)
(\exists)
(\not)
(\in)
(\times)
(\cdot)
(\subset)
(\supset)
(\subseteq)

Miscellaneous
cal letters

c hletteri

preview-latex
Activation
preview-latex is part of AUCTEX. If it is active, you should
see an entry Preview in the menu bar when editing LaTEX
files. If you have a LaTeX, but no Preview menu, add the
following to your .emacs file:
(load "preview-latex.el" nil t t)

Usage and keybindings


preview-latex operation only affects the display of the buffer,
not its contents. It runs only on demand, using the target
dvi or PDF files in the process. The first command in the
following list (also on the toolbar button) will (as applicable)
repreview an active region or a single modified preview, toggle
the visibility of an unmodified preview or generate previews for
a surrounding buffer area up to the next preview.
Preview at point
Preview environment
Preview region
Preview buffer
Preview document
Remove previews at point
Remove previews from region
Remove previews from buffer
Remove previews from document
Cache preamble
Switch off preamble cache
Read Texinfo manual
Copy region as MML

C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c

C-p
C-p
C-p
C-p
C-p
C-p
C-p
C-p
C-p
C-p
C-p
C-p
C-p

C-p
C-e
C-r
C-b
C-d
C-c
C-c
C-c
C-c
C-f
C-c
TAB
C-w

Customization is done in the document preamble (you need to


load preview.sty explicitly) or in prauctex.cfg (which should
load the system prauctex.cfg first). Commands:
Preview macro
\PreviewMacro[{hargsi}]{hmacroi}
Preview env
\PreviewEnvironment[{hargsi}]{henvi}
Skip macro
\PreviewMacro*[{hargsi}]{hmacroi}
Skip env
\PreviewEnvironment*[{hargsi}]{henvi}

Activation

Diverting material from float environments


Snarf stuff
\PreviewSnarfEnvironment[{hargsi}]{henvi}

Table of Contents

Values to be used within hargsi:


Optional argument
[]
Mandatory argument
{}
Optional star
*
Conditionals
?htokeni{hif foundi}{hif not foundi}
Skip next token
Transformation
#{hmacro argsi}{hreplacementi}
More options and explanations can be found in preview.dvi or
the Texinfo manual.

Folding Source Display

C-d
C-r
C-b
C-d
C-f

The last keysequence will copy a region with previews into the
kill buffer in a form fit for sending in Emacs message-mode.

Customization within Emacs


You can use M-x customize-variable RET or the Preview/
Customize menu for customization. Worthwhile settings:
If you have dvipng available:
Set to dvipng

RefTeX

Customization from LaTEX

preview-image-type

Keep counter values when regenerating single previews:


Set to t
preview-preserve-counters
Cache/Dont cache preamble without query (preamble caching
is done using mylatex.ltx and might not always work. Use the
appropriate key sequences for overriding the following setting):
Set to t/nil
preview-auto-cache-preamble

Toggle folding mode


Hide all items in buffer
Hide all items in region
Hide all items in paragraph
Hide current macro
Hide current environment
Show all items in buffer
Show all items in region
Show all items in paragraph
Show current item
Hide or show current item

C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c
C-c

C-o
C-o
C-o
C-o
C-o
C-o
C-o
C-o
C-o
C-o
C-o

C-f
C-b
C-r
C-p
C-m
C-e
b
r
p
i
C-o

Outlining TEX Documents


AUCTEX supports outline mode by defining section, subsection, etc. as heading levels. You can use M-x outline-minormode RET to toggle outline minor mode. All outline minor mode
commands are under the prefix key specified by outline-minormode-prefix, default is C-c @.
Hide all of buffer except headings
Show all text in buffer
Hide body following this heading
Show body following this heading
Hide subtree
Show subtree
All subheadings visible

C-c
C-c
C-c
C-c
C-c
C-c
C-c

@
@
@
@
@
@
@

C-t
C-a
C-c
C-e
C-d
C-s
C-k

next visible heading


previous visible heading
forward to next subheading
backward to next subheading
up one heading level

C-c
C-c
C-c
C-c
C-c

@
@
@
@
@

C-n
C-p
C-f
C-b
C-u

RefTeX is part of [X]Emacs. To activate and make it interact


with AUCTeX, insert the following lines in .emacs.
(add-hook latex-mode-hook turn-on-reftex)
(add-hook LaTeX-mode-hook turn-on-reftex)
(setq reftex-plug-into-auctex t)

The table of contents is a structured view of the entire document. It contains the sections, and optionally labels, index
entries, and file boundaries.
Show the table of contents1
C-c =
Recenter *toc* buffer to here1
C-c -

Crossreferences, Citations, Index


Insert unique label1
Reference a label1
Insert citation with key selection
. . . prompt for optional arguments
Index word at point with default macro
Insert an index entry
Add word to index phrases
Visit index phrases buffer
Compile and display index
View cross reference1
View cross reference with mouse
View cross reference from BibTeX file

C-c (
C-c )
C-c [
C-u C-c [
C-c /
C-c <
C-c \
C-c |
C-c >
C-c &
S-mouse-2
C-c &

Standard keys in special buffers


RefTeXs special buffers have many active keys. The common
ones are:
Display summary of active keys
?
Select this item
RET
Rescan the document
r
Display location in other window
SPC
Follow mode
f

Multifile actions
Since RefTeX scans the entire (multifile) document, it can provide commands that act on all files of a document. Check the
Ref->Global Actions menu for these commands.

Variables
To tell reftex about your own macro definitions, customize the
variables
reftex-label-alist
reftex-section-lecels
reftex-index-macros
reftex-cite-format
1 An argument of C-u triggers a document scan first.

This
can be necessary if file content and RefTeXs knowledge are no
longer consistent.

You might also like