1 % Reference Card for AUCTeX version 11.92
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.92}
47 \def\version{December \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-1994, 2004-2006, 2008, 2010,}
56 \centerline{2012, 2014-2017 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}
248 \key{Compile all and view output file}{C-c C-a}
250 Commands you can run on the master file (with \kbd{C-c C-c}) or the
251 region (with \kbd{C-c C-r}) include the following (starred versions
252 are not available in all modes):
254 \def\star{\llap{\rm*}}
255 \key{\TeX}{\star TeX}
256 \key{\LaTeX}{\star LaTeX}
257 \key{Con\TeX{}t (once)}{\star ConTeXt}
258 \key{Con\TeX{}t Full}{\star ConTeXt Full}
259 \key{Makeinfo}{\star Makeinfo}
260 \key{Makeinfo with HTML output}{\star Makeinfo HTML}
261 \key{Appropriate previewer}{View}
262 \key{Print the output}{Print}
263 \key{Bib\TeX}{BibTeX}
265 \key{MakeIndex}{Index}
267 \key{Make (PostScript) File}{File}
269 \key{Delete intermediate files}{Clean}
270 \key{Delete all output files}{Clean All}
272 \section{\TeX ing options}
273 \TeX\ runs can come in various types, which may be toggled and are
274 indicated in the mode line.
276 \key{PDF/DVI mode}{C-c C-t C-p}
277 \key{Stop on errors (Interactive mode)}{C-c C-t C-i}
278 \key{I/O correlation (S. Specials, Sync\TeX)}{C-c C-t C-s}
280 \section{Miscellaneous}
282 \key{Read AUC\TeX\ manual}{C-c TAB}
283 \key{Find documentation}{C-c ?}
284 \key{Math Mode}{C-c \string~}
285 \key{Reset Buffer}{C-c C-n}
286 \key{Reset AUC\TeX}{C-u C-c C-n}
288 \section{Multifile Handling}
290 \key{Save Document}{C-c C-d}
291 \key{Switch to master file or active buffer}{C-c ^}
292 \key{Query for a master file}{C-c \_}
294 \section{Command Insertion}
296 \key{Insert Section}{C-c C-s}
297 \key{Insert \LaTeX\ environment}{C-c C-e}
298 \key{Insert item}{C-c LFD}
299 \key{Insert item (alias)}{M-RET}
300 \key{Close \LaTeX\ environment}{C-c ]}
301 \key{Insert \TeX\ macro \kbd{\{\}} }{C-c C-m}
302 \key{Insert double brace}{C-c \{}
303 \key{Complete \TeX\ macro}{M-TAB}
304 \key{Smart ``quote''}{"}
305 \key{Smart ``dollar''}{\$}
307 \section{Font Selection}
309 \key{Insert {\bf bold\/} text}{C-c C-f C-b}
310 \key{Insert {\it italics\/} text}{C-c C-f C-i}
311 \key{Insert {\rm roman} text}{C-c C-f C-r}
312 \key{Insert {\it emphasized\/} text}{C-c C-f C-e}
313 \key{Insert {\tt typewriter\/} text}{C-c C-f C-t}
314 \key{Insert {\sl slanted\/} text}{C-c C-f C-s}
315 \key{Insert {\sc Small Caps\/} text}{C-c C-f C-c}
316 \key{Delete font}{C-c C-f C-d}
317 \key{Replace font}{C-u C-c C-f \<key>}
319 \section{Source Formatting}
321 \key{Indent current line}{TAB}
322 \key{Indent next line}{LFD}
324 \key{Format a paragraph}{M-q}
325 \key{Format a region}{C-c C-q C-r}
326 \key{Format a section}{C-c C-q C-s}
327 \key{Format an environment}{C-c C-q C-e}
329 \key{Mark an environment}{C-c .}
330 \key{Mark a section}{C-c *}
332 \key{Comment or uncomment region}{C-c ;}
333 \key{Comment or uncomment paragraph}{C-c \%}
343 All math mode commands are under the prefix key specified by
344 LaTeX-math-abbrev-prefix, default is "`".
346 You can define your own math mode commands by setting the variable
347 LaTeX-math-list before loading LaTeX-math-mode.
349 \section{Greek Letters}
351 \def\disp#1{\hbox to 6ex{$#1$\hfill}}
353 \def\key##1##2{##1&##2\cr}%
354 \setbox0\vbox{\halign to 0.45\hsize{\tabskip0ptplus1fil\relax
355 ##\hfil&\kbd{##}\hfil\cr\vrule width0ptheight\ht\strutbox#1}}%
357 \splittopskip=\ht\strutbox
359 \advance\dimen0\baselineskip
360 \setbox2\vsplit0to0.5\dimen0
361 \vtop{\unvbox2}\hfill\raise \ht\strutbox \vtop {\unvbox0}}}}
362 \def\keycs#1#2#{\keycsii#1{#2}}
363 \def\keycsii#1#2#3{\key{\disp{#1#2} ({\tt\string#1})}{#3}}
403 \keycs\rightarrow{C-f}
404 \keycs\leftarrow{C-b}
406 \keycs\downarrow{C-n}
409 \keycs\tilde x{\string~}
441 \section{Miscellaneous}
443 \key{cal letters}{c \<letter>}
447 \def\previewlatex{{preview-latex}}
448 \title{\previewlatex}
450 \previewlatex\ is part of AUC\TeX. If it is active, you should see an
451 entry ``Preview'' in the menu bar when editing \LaTeX{} files. If you
452 have a ``LaTeX'', but no ``Preview'' menu, add the following to your
455 (load "preview-latex.el" nil t t)
458 \section{Usage and keybindings}
459 \previewlatex\ operation only affects the display of the buffer, not
460 its contents. It runs only on demand, using the target {\sc dvi} or
461 {\sc PDF} files in the process. The first command in the following
462 list (also on the toolbar button) will (as applicable) repreview an
463 active region or a single modified preview, toggle the visibility of
464 an unmodified preview or generate previews for a surrounding buffer
465 area up to the next preview.
467 \key{Preview at point}{C-c C-p C-p}
468 \key{Preview environment}{C-c C-p C-e}
469 \key{Preview region}{C-c C-p C-r}
470 \key{Preview buffer}{C-c C-p C-b}
471 \key{Preview document}{C-c C-p C-d}
472 \key{Remove previews at point}{C-c C-p C-c C-p}
473 \key{Remove previews from region}{C-c C-p C-c C-r}
474 \key{Remove previews from buffer}{C-c C-p C-c C-b}
475 \key{Remove previews from document}{C-c C-p C-c C-d}
476 \key{Cache preamble}{C-c C-p C-f}
477 \key{Switch off preamble cache}{C-c C-p C-c C-f}
478 \key{Read Texinfo manual}{C-c C-p TAB}
479 \key{Copy region as MML}{C-c C-p C-w}
481 The last keysequence will copy a region with previews into the kill
482 buffer in a form fit for sending in Emacs' message-mode.
484 \section{Customization within Emacs}
486 You can use \kbd{M-x customize-variable RET} or the ``Preview\slash
487 Customize'' menu for customization. Worthwhile settings:
489 \halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
490 \noalign{\medskip If you have dvipng available:}
491 Set to \kbd{dvipng}&preview-image-type\cr
492 \noalign{\medskip \vbox{Keep counter values when regenerating
494 Set to \kbd{t}&preview-preserve-counters\cr
495 \noalign{\medskip \vbox{Cache/Don't cache preamble without query
496 (preamble caching is done using {\tt mylatex.ltx} and might not always
497 work. Use the appropriate key sequences for overriding the following
499 Set to \kbd{t}/\kbd{nil}&preview-auto-cache-preamble\cr}
501 \section{Customization from \LaTeX{}}
502 Customization is done in the document preamble (you need to load {\tt
503 preview.sty} explicitly) or in {\tt prauctex.cfg} (which should load
504 the system {prauctex.cfg} first). Commands:
506 \halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
507 Preview macro&\string\PreviewMacro[\{\<args>\}]\{\<macro>\}\cr
508 Preview env&\string\PreviewEnvironment[\{\<args>\}]\{\<env>\}\cr
509 Skip macro&\string\PreviewMacro*[\{\<args>\}]\{\<macro>\}\cr
510 Skip env&\string\PreviewEnvironment*[\{\<args>\}]\{\<env>\}\cr
511 \noalign{\smallskip Diverting material from float environments}
512 Snarf stuff&\string\PreviewSnarfEnvironment[\{\<args>\}]\{\<env>\}\cr
515 Values to be used within \<args>:
517 \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
518 Optional argument&[]\cr
519 Mandatory argument&\{\}\cr
521 Conditionals&?\<token>\{\<if found>\}\{\<if not found>\}\cr
523 Transformation&\#\{\<macro args>\}\{\<replacement>\}\cr
526 More options and explanations can be found in {\tt preview.dvi} or the
529 \vskip 5ex plus 6ex minus 1ex
531 \title{Folding Source Display}
533 \key{Toggle folding mode}{C-c C-o C-f}
534 \key{Hide all items in buffer}{C-c C-o C-b}
535 \key{Hide all items in region}{C-c C-o C-r}
536 \key{Hide all items in paragraph}{C-c C-o C-p}
537 \key{Hide current macro}{C-c C-o C-m}
538 \key{Hide current environment}{C-c C-o C-e}
539 \key{Show all items in buffer}{C-c C-o b}
540 \key{Show all items in region}{C-c C-o r}
541 \key{Show all items in paragraph}{C-c C-o p}
542 \key{Show current item}{C-c C-o i}
543 \key{Hide or show current item}{C-c C-o C-o}
545 \vskip 5ex plus 6ex minus 1ex
547 \title{Outlining \TeX\ Documents}
549 AUC\TeX\ supports outline mode by defining section, subsection,
550 etc. as heading levels. You can use \kbd{M-x outline-minor-mode RET}
551 to toggle outline minor mode. All outline minor mode commands are
552 under the prefix key specified by outline-minor-mode-prefix, default
555 \key{Hide all of buffer except headings}{C-c @ C-t}
556 \key{Show all text in buffer}{C-c @ C-a}
557 \key{Hide body following this heading}{C-c @ C-c}
558 \key{Show body following this heading}{C-c @ C-e}
559 \key{Hide subtree}{C-c @ C-d}
560 \key{Show subtree}{C-c @ C-s}
561 \key{All subheadings visible}{C-c @ C-k}
563 \key{next visible heading}{C-c @ C-n}
564 \key{previous visible heading}{C-c @ C-p}
565 \key{forward to next subheading}{C-c @ C-f}
566 \key{backward to next subheading}{C-c @ C-b}
567 \key{up one heading level}{C-c @ C-u}
571 \iftrue % RefTeX long version
577 RefTeX is part of [X]Emacs. To activate and make it interact with
578 AUCTeX, insert the following lines in .emacs.
581 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
582 (setq reftex-plug-into-AUCTeX t)
585 \section{Table of Contents}
586 The table of contents is a structured view of the entire document. It
587 contains the sections, and optionally labels, index entries, and file
590 \key{Show the table of contents$\sp1$}{C-c =}
591 \key{Recenter *toc* buffer to here$\sp1$}{C-c -}
593 \section{Crossreferences, Citations, Index}
595 \key{Insert unique label$\sp1$}{C-c (}
596 \key{Reference a label$\sp1$}{C-c )}
597 \key{Insert citation with key selection}{C-c [}
598 \key{\dots\ prompt for optional arguments}{C-u C-c [}
599 \key{Index word at point with default macro}{C-c /}
600 \key{Insert an index entry}{C-c <}
601 \key{Add word to index phrases}{C-c \\}
602 \key{Visit index phrases buffer}{C-c |}
603 \key{Compile and display index}{C-c >}
604 \key{View cross reference$\sp1$}{C-c \&}
605 \key{View cross reference with mouse}{S-mouse-2}
606 \key{View cross reference from BibTeX file}{C-c \&}
608 \section{Standard keys in special buffers}
609 RefTeX's special buffers have many active keys. The common ones are:
611 \key{Display summary of active keys}{?}
612 \key{Select this item}{RET}
613 \key{Rescan the document}{r}
614 \key{Display location in other window}{SPC}
617 \section{Multifile actions}
618 Since RefTeX scans the entire (multifile) document, it can provide
619 commands that act on all files of a document. Check the {\tt
620 Ref->Global Actions} menu for these commands.
624 To tell reftex about your own macro definitions, customize the
629 reftex-section-levels
635 $\sp1$ An argument of \kbd{C-u} triggers a document scan first. This can
636 be necessary if file content and RefTeX's knowledge are no longer
639 \else % RefTeX compact version
641 \csname title\endcsname{RefTeX}
643 \section{Activation in .emacs}
647 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
648 (setq reftex-plug-into-auctex t)
651 \section{Table of Contents}
653 \key{Show the table of contents$\sp1$}{C-c =}
654 \key{Recenter *toc* buffer to here$\sp1$}{C-c -}
656 \section{Crossreferences, Citations, Index}
658 \key{Insert unique label$\sp1$}{C-c (}
659 \key{Reference a label$\sp1$}{C-c )}
660 \key{Insert citation with key selection}{C-c [}
661 \key{... prompt for optional arguments}{C-u C-c [}
662 \key{Index word at point with default macro}{C-c /}
663 \key{Insert an index entry}{C-c <}
664 \key{Add word to index phrases}{C-c \\}
665 \key{Visit index phrases buffer}{C-c |}
666 \key{Compile and display index}{C-c >}
667 \key{View cross reference$\sp1$}{C-c \&}
668 \key{View cross reference with mouse}{S-mouse-2}
669 \key{View cross reference from BibTeX file}{C-c \&}
672 $\sp1$ An argument of \kbd{C-u} triggers a document scan first.