1 % Reference Card for AUCTeX version 11.88
3 \newcount\columnsperpage
5 % This file has only been checked with 3 columns per page. But it
6 % should print fine either via DVI or PDFTeX.
10 % Papersize stuff. Use default paper size for PDF, but switch
11 % orientation. Use papersize special for dvips.
13 \ifx\pdfoutput\undefined
14 \csname newcount\endcsname\pdfoutput
19 % \special{papersize 8.5in,11in}%
20 \special{papersize 297mm,210mm}%
23 \pdfpagewidth\pdfpageheight
28 % This file is intended to be processed by plain TeX (TeX82).
29 % compile-command: "tex tex-ref" or "pdftex tex-ref"
31 % Original author of Auc-TeX Reference Card:
33 % Terrence Brannon, PO Box 5027, Bethlehem, PA 18015 , USA
34 % internet: tb06@pl118f.cc.lehigh.edu (215) 758-1720 (215) 758-2104
36 % Kresten Krab Thorup updated the reference card to 6.
37 % Per Abrahamsen updated the reference card to 7, 8, and 9.
38 % Ralf Angeli updated it to 11.50.
39 % And David Kastrup messed around with it, too, merging the math reference.
41 % Thanks to Stephen Gildea
42 % Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
43 % for creating the GNU Emacs Reference Card from which this was mutated
45 \def\versionnumber{11.88}
47 \def\version{October \year\ v\versionnumber}
49 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
50 \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
51 Permissions on back. v\versionnumber}}
53 \def\copyrightnotice{%
54 \vskip 1ex plus 2 fill\begingroup\small
55 \centerline{Copyright \copyright\ 1987, 1992, 1993, 2004, 2005, 2008,}
56 \centerline{2010, 2012, 2014 Free Software Foundation, Inc.}
57 \centerline{for AUC\TeX\ version \versionnumber}
59 Permission is granted to make and distribute copies of
60 this card provided the copyright notice and this permission notice
61 are preserved on all copies.
66 % make \bye not \outer so that the \def\bye in the \else clause below
67 % can be scanned without complaint.
68 \def\bye{\par\vfill\supereject\end}
70 \newdimen\intercolumnskip
74 \edef\ncolumns{\the\columnsperpage}
76 \message{[\ncolumns\space
77 column\if 1\ncolumns\else s\fi\space per page]}
79 \def\scaledmag#1{ scaled \magstep #1}
81 % This multi-way format was designed by Stephen Gildea
87 \font\titlefont=\fontname\tenbf \scaledmag3
88 \font\headingfont=\fontname\tenbf \scaledmag2
89 \font\smallfont=\fontname\sevenrm
90 \font\smallsy=\fontname\sevensy
93 \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
99 \font\titlefont=cmbx10 \scaledmag2
100 \font\headingfont=cmbx10 \scaledmag1
112 \def\rm{\fam0 \eightrm}
118 \normalbaselineskip=.8\normalbaselineskip
119 \ht\strutbox.8\ht\strutbox
120 \dp\strutbox.8\dp\strutbox
121 \normallineskip=.8\normallineskip
122 \normallineskiplimit=.8\normallineskiplimit
123 \normalbaselines\rm %make definitions take effect
127 \footline{\hss\rm\folio\hss}
128 \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
133 \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
134 \errmessage{Illegal number of columns per page}
137 \intercolumnskip=.46in
140 % This next line is useful when designing the layout.
141 %\immediate\write16{Column \folio\abc\space starts with \firstmark}
142 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
144 \global\setbox\columna\columnbox \global\def\abc{b}
145 %% in case we never use \columnb (two-column mode)
146 \global\setbox\columnb\hbox to -\intercolumnskip{}
148 \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
149 \def\multicolumnformat{\shipout\vbox{\makeheadline
150 \hbox{\box\columna\hskip\intercolumnskip
151 \box\columnb\hskip\intercolumnskip\columnbox}
152 \makefootline}\advancepageno}
153 \def\columnbox{\leftline{\pagebody}}
155 \def\bye{\par\vfill\supereject
156 \if a\abc \else\null\vfill\eject\fi
157 \if a\abc \else\null\vfill\eject\fi
161 % we won't be using math mode much, so redefine some of the characters
162 % we might want to talk about
170 \hyphenation{mini-buf-fer}
173 \parskip 1ex plus .5ex minus .5ex
175 \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
177 \def\newcolumn{\vfill\eject}
179 \def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
181 \def\section#1{\par\vskip 0pt plus 0.2\vsize \penalty-3000
182 \vskip 0pt plus -0.2\vsize
183 \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
184 \vskip 2ex plus 1ex minus 1.5ex}
188 \def\beginindentedkeys{\keyindent=1em}
189 \def\endindentedkeys{\keyindent=0em}
192 \def\paralign{\vskip\parskip\halign}
194 \def\<#1>{$\langle${\rm #1}$\rangle$}
196 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
198 \def\beginexample{\par\leavevmode\begingroup
199 \obeylines\obeyspaces\parskip0pt\tt}
200 {\obeyspaces\global\let =\ }
201 \def\endexample{\endgroup}
203 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop
204 {\hsize=.68\hsize\rightskip=1em
205 \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
208 \setbox\metaxbox\hbox{\kbd{M-x }}
210 \metaxwidth=\wd\metaxbox
212 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
213 {\hskip\keyindent\relax#1\hfil}%
214 \hskip -\metaxwidth minus 1fil
217 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
221 L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX}
225 \title{AUC\TeX\ Reference Card}
227 \centerline{(for version \versionnumber)}
229 \section{Conventions Used}
231 \key{Carriage Return or \kbd{C-m}}{RET}
232 \key{Tabular or \kbd{C-i}}{TAB}
233 \key{Linefeed or \kbd{C-j}}{LFD}
235 \section{Shell Interaction}
237 \key{Run a command on the master file}{C-c C-c}
238 \key{Run a command on the buffer}{C-c C-b}
239 \key{Run a command on the region}{C-c C-r}
240 \key{Fix the region}{C-c C-t C-r}
241 \key{Kill job}{C-c C-k}
242 \key{Recenter output buffer}{C-c C-l}
243 \key{Next error in \TeX/\LaTeX\ session}{C-c `}
244 \key{Previous error in \TeX/\LaTeX\ session}{M-g p}
245 \key{Toggle debug of bad boxes}{C-c C-t C-b}
246 \key{Toggle debug of warnings}{C-c C-t C-w}
247 \key{View output file}{C-c C-v}
249 Commands you can run on the master file (with \kbd{C-c C-c}) or the
250 region (with \kbd{C-c C-r}) include the following (starred versions
251 are not available in all modes):
253 \def\star{\llap{\rm*}}
254 \key{\TeX}{\star TeX}
255 \key{\LaTeX}{\star LaTeX}
256 \key{Con\TeX{}t (once)}{\star ConTeXt}
257 \key{Con\TeX{}t Full}{\star ConTeXt Full}
258 \key{Makeinfo}{\star Makeinfo}
259 \key{Makeinfo with HTML output}{\star Makeinfo HTML}
260 \key{Appropriate previewer}{View}
261 \key{Print the output}{Print}
262 \key{Bib\TeX}{BibTeX}
264 \key{MakeIndex}{Index}
266 \key{Make (PostScript) File}{File}
268 \key{Delete intermediate files}{Clean}
269 \key{Delete all output files}{Clean All}
271 \section{\TeX ing options}
272 \TeX\ runs can come in various types, which may be toggled and are
273 indicated in the mode line.
275 \key{PDF/DVI mode}{C-c C-t C-p}
276 \key{Stop on errors (Interactive mode)}{C-c C-t C-i}
277 \key{I/O correlation (S. Specials, Sync\TeX)}{C-c C-t C-s}
279 \section{Miscellaneous}
281 \key{Read AUC\TeX\ manual}{C-c TAB}
282 \key{Find documentation}{C-c ?}
283 \key{Math Mode}{C-c \string~}
284 \key{Reset Buffer}{C-c C-n}
285 \key{Reset AUC\TeX}{C-u C-c C-n}
287 \section{Multifile Handling}
289 \key{Save Document}{C-c C-d}
290 \key{Switch to master file or active buffer}{C-c ^}
291 \key{Query for a master file}{C-c \_}
293 \section{Command Insertion}
295 \key{Insert Section}{C-c C-s}
296 \key{Insert \LaTeX\ environment}{C-c C-e}
297 \key{Insert item}{C-c LFD}
298 \key{Insert item (alias)}{M-RET}
299 \key{Close \LaTeX\ environment}{C-c ]}
300 \key{Insert \TeX\ macro \kbd{\{\}} }{C-c C-m}
301 \key{Insert double brace}{C-c \{}
302 \key{Complete \TeX\ macro}{M-TAB}
303 \key{Smart ``quote''}{"}
304 \key{Smart ``dollar''}{\$}
306 \section{Font Selection}
308 \key{Insert {\bf bold\/} text}{C-c C-f C-b}
309 \key{Insert {\it italics\/} text}{C-c C-f C-i}
310 \key{Insert {\rm roman} text}{C-c C-f C-r}
311 \key{Insert {\it emphasized\/} text}{C-c C-f C-e}
312 \key{Insert {\tt typewriter\/} text}{C-c C-f C-t}
313 \key{Insert {\sl slanted\/} text}{C-c C-f C-s}
314 \key{Insert {\sc Small Caps\/} text}{C-c C-f C-c}
315 \key{Delete font}{C-c C-f C-d}
316 \key{Replace font}{C-u C-c C-f \<key>}
318 \section{Source Formatting}
320 \key{Indent current line}{TAB}
321 \key{Indent next line}{LFD}
323 \key{Format a paragraph}{M-q}
324 \key{Format a region}{C-c C-q C-r}
325 \key{Format a section}{C-c C-q C-s}
326 \key{Format an environment}{C-c C-q C-e}
328 \key{Mark an environment}{C-c .}
329 \key{Mark a section}{C-c *}
331 \key{Comment or uncomment region}{C-c ;}
332 \key{Comment or uncomment paragraph}{C-c \%}
342 All math mode commands are under the prefix key specified by
343 LaTeX-math-abbrev-prefix, default is "`".
345 You can define your own math mode commands by setting the variable
346 LaTeX-math-list before loading LaTeX-math-mode.
348 \section{Greek Letters}
350 \def\disp#1{\hbox to 6ex{$#1$\hfill}}
352 \def\key##1##2{##1&##2\cr}%
353 \setbox0\vbox{\halign to 0.45\hsize{\tabskip0ptplus1fil\relax
354 ##\hfil&\kbd{##}\hfil\cr\vrule width0ptheight\ht\strutbox#1}}%
356 \splittopskip=\ht\strutbox
358 \advance\dimen0\baselineskip
359 \setbox2\vsplit0to0.5\dimen0
360 \vtop{\unvbox2}\hfill\raise \ht\strutbox \vtop {\unvbox0}}}}
361 \def\keycs#1#2#{\keycsii#1{#2}}
362 \def\keycsii#1#2#3{\key{\disp{#1#2} ({\tt\string#1})}{#3}}
402 \keycs\rightarrow{C-f}
403 \keycs\leftarrow{C-b}
405 \keycs\downarrow{C-n}
408 \keycs\tilde x{\string~}
440 \section{Miscellaneous}
442 \key{cal letters}{c \<letter>}
446 \def\previewlatex{{preview-latex}}
447 \title{\previewlatex}
449 \previewlatex\ is part of AUC\TeX. If it is active, you should see an
450 entry ``Preview'' in the menu bar when editing \LaTeX{} files. If you
451 have a ``LaTeX'', but no ``Preview'' menu, add the following to your
454 (load "preview-latex.el" nil t t)
457 \section{Usage and keybindings}
458 \previewlatex\ operation only affects the display of the buffer, not
459 its contents. It runs only on demand, using the target {\sc dvi} or
460 {\sc PDF} files in the process. The first command in the following
461 list (also on the toolbar button) will (as applicable) repreview an
462 active region or a single modified preview, toggle the visibility of
463 an unmodified preview or generate previews for a surrounding buffer
464 area up to the next preview.
466 \key{Preview at point}{C-c C-p C-p}
467 \key{Preview environment}{C-c C-p C-e}
468 \key{Preview region}{C-c C-p C-r}
469 \key{Preview buffer}{C-c C-p C-b}
470 \key{Preview document}{C-c C-p C-d}
471 \key{Remove previews at point}{C-c C-p C-c C-p}
472 \key{Remove previews from region}{C-c C-p C-c C-r}
473 \key{Remove previews from buffer}{C-c C-p C-c C-b}
474 \key{Remove previews from document}{C-c C-p C-c C-d}
475 \key{Cache preamble}{C-c C-p C-f}
476 \key{Switch off preamble cache}{C-c C-p C-c C-f}
477 \key{Read Texinfo manual}{C-c C-p TAB}
478 \key{Copy region as MML}{C-c C-p C-w}
480 The last keysequence will copy a region with previews into the kill
481 buffer in a form fit for sending in Emacs' message-mode.
483 \section{Customization within Emacs}
485 You can use \kbd{M-x customize-variable RET} or the ``Preview\slash
486 Customize'' menu for customization. Worthwhile settings:
488 \halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
489 \noalign{\medskip If you have dvipng available:}
490 Set to \kbd{dvipng}&preview-image-type\cr
491 \noalign{\medskip \vbox{Keep counter values when regenerating
493 Set to \kbd{t}&preview-preserve-counters\cr
494 \noalign{\medskip \vbox{Cache/Don't cache preamble without query
495 (preamble caching is done using {\tt mylatex.ltx} and might not always
496 work. Use the appropriate key sequences for overriding the following
498 Set to \kbd{t}/\kbd{nil}&preview-auto-cache-preamble\cr}
500 \section{Customization from \LaTeX{}}
501 Customization is done in the document preamble (you need to load {\tt
502 preview.sty} explicitly) or in {\tt prauctex.cfg} (which should load
503 the system {prauctex.cfg} first). Commands:
505 \halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
506 Preview macro&\string\PreviewMacro[\{\<args>\}]\{\<macro>\}\cr
507 Preview env&\string\PreviewEnvironment[\{\<args>\}]\{\<env>\}\cr
508 Skip macro&\string\PreviewMacro*[\{\<args>\}]\{\<macro>\}\cr
509 Skip env&\string\PreviewEnvironment*[\{\<args>\}]\{\<env>\}\cr
510 \noalign{\smallskip Diverting material from float environments}
511 Snarf stuff&\string\PreviewSnarfEnvironment[\{\<args>\}]\{\<env>\}\cr
514 Values to be used within \<args>:
516 \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
517 Optional argument&[]\cr
518 Mandatory argument&\{\}\cr
520 Conditionals&?\<token>\{\<if found>\}\{\<if not found>\}\cr
522 Transformation&\#\{\<macro args>\}\{\<replacement>\}\cr
525 More options and explanations can be found in {\tt preview.dvi} or the
528 \vskip 5ex plus 6ex minus 1ex
530 \title{Folding Source Display}
532 \key{Toggle folding mode}{C-c C-o C-f}
533 \key{Hide all items in buffer}{C-c C-o C-b}
534 \key{Hide all items in region}{C-c C-o C-r}
535 \key{Hide all items in paragraph}{C-c C-o C-p}
536 \key{Hide current macro}{C-c C-o C-m}
537 \key{Hide current environment}{C-c C-o C-e}
538 \key{Show all items in buffer}{C-c C-o b}
539 \key{Show all items in region}{C-c C-o r}
540 \key{Show all items in paragraph}{C-c C-o p}
541 \key{Show current item}{C-c C-o i}
542 \key{Hide or show current item}{C-c C-o C-o}
544 \vskip 5ex plus 6ex minus 1ex
546 \title{Outlining \TeX\ Documents}
548 AUC\TeX\ supports outline mode by defining section, subsection,
549 etc. as heading levels. You can use \kbd{M-x outline-minor-mode RET}
550 to toggle outline minor mode. All outline minor mode commands are
551 under the prefix key specified by outline-minor-mode-prefix, default
554 \key{Hide all of buffer except headings}{C-c @ C-t}
555 \key{Show all text in buffer}{C-c @ C-a}
556 \key{Hide body following this heading}{C-c @ C-c}
557 \key{Show body following this heading}{C-c @ C-e}
558 \key{Hide subtree}{C-c @ C-d}
559 \key{Show subtree}{C-c @ C-s}
560 \key{All subheadings visible}{C-c @ C-k}
562 \key{next visible heading}{C-c @ C-n}
563 \key{previous visible heading}{C-c @ C-p}
564 \key{forward to next subheading}{C-c @ C-f}
565 \key{backward to next subheading}{C-c @ C-b}
566 \key{up one heading level}{C-c @ C-u}
570 \iftrue % RefTeX long version
576 RefTeX is part of [X]Emacs. To activate and make it interact with
577 AUCTeX, insert the following lines in .emacs.
580 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
581 (setq reftex-plug-into-auctex t)
584 \section{Table of Contents}
585 The table of contents is a structured view of the entire document. It
586 contains the sections, and optionally labels, index entries, and file
589 \key{Show the table of contents$\sp1$}{C-c =}
590 \key{Recenter *toc* buffer to here$\sp1$}{C-c -}
592 \section{Crossreferences, Citations, Index}
594 \key{Insert unique label$\sp1$}{C-c (}
595 \key{Reference a label$\sp1$}{C-c )}
596 \key{Insert citation with key selection}{C-c [}
597 \key{\dots\ prompt for optional arguments}{C-u C-c [}
598 \key{Index word at point with default macro}{C-c /}
599 \key{Insert an index entry}{C-c <}
600 \key{Add word to index phrases}{C-c \\}
601 \key{Visit index phrases buffer}{C-c |}
602 \key{Compile and display index}{C-c >}
603 \key{View cross reference$\sp1$}{C-c \&}
604 \key{View cross reference with mouse}{S-mouse-2}
605 \key{View cross reference from BibTeX file}{C-c \&}
607 \section{Standard keys in special buffers}
608 RefTeX's special buffers have many active keys. The common ones are:
610 \key{Display summary of active keys}{?}
611 \key{Select this item}{RET}
612 \key{Rescan the document}{r}
613 \key{Display location in other window}{SPC}
616 \section{Multifile actions}
617 Since RefTeX scans the entire (multifile) document, it can provide
618 commands that act on all files of a document. Check the {\tt
619 Ref->Global Actions} menu for these commands.
623 To tell reftex about your own macro definitions, customize the
628 reftex-section-levels
634 $\sp1$ An argument of \kbd{C-u} triggers a document scan first. This can
635 be necessary if file content and RefTeX's knowledge are no longer
638 \else % RefTeX compact version
640 \csname title\endcsname{RefTeX}
642 \section{Activation in .emacs}
646 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
647 (setq reftex-plug-into-auctex t)
650 \section{Table of Contents}
652 \key{Show the table of contents$\sp1$}{C-c =}
653 \key{Recenter *toc* buffer to here$\sp1$}{C-c -}
655 \section{Crossreferences, Citations, Index}
657 \key{Insert unique label$\sp1$}{C-c (}
658 \key{Reference a label$\sp1$}{C-c )}
659 \key{Insert citation with key selection}{C-c [}
660 \key{... prompt for optional arguments}{C-u C-c [}
661 \key{Index word at point with default macro}{C-c /}
662 \key{Insert an index entry}{C-c <}
663 \key{Add word to index phrases}{C-c \\}
664 \key{Visit index phrases buffer}{C-c |}
665 \key{Compile and display index}{C-c >}
666 \key{View cross reference$\sp1$}{C-c \&}
667 \key{View cross reference with mouse}{S-mouse-2}
668 \key{View cross reference from BibTeX file}{C-c \&}
671 $\sp1$ An argument of \kbd{C-u} triggers a document scan first.