Node: Keys and lisp, Next: , Previous: Installation, Up: Top



Key bindings and user-level lisp functions

To the key bindings, lisp functions and menu entries in AUCTeX (see Key Index), the following are added:

C-c C-p C-p
preview-at-point
Preview/Generate previews (or toggle) at point
If the cursor is positioned on or inside of a preview area, this toggles its visibility, regenerating the preview if necessary. If not, it will run the surroundings through preview. The surroundings include all areas up to the next valid preview, unless invalid previews occur before, in which case the area will include the last such preview in either direction.
<mouse-2>
<mouse-3>
The middle mouse button has a similar action bound to it as preview-at-point, only that it knows which preview to apply it to according to the position of the click. You can click either anywhere on a previewed image, or when the preview is opened and showing the source text, you can click on the icon preceding the source text. In other areas, the usual mouse key action (typically: paste) is not affected. The right mouse key pops up a context menu with several options.
C-c C-p C-e
preview-environment (&optional count)
Preview/Generate previews for environment
Run preview on LaTeX environment. The environments in preview-inner-environments are treated as inner levels so that for instance, the split environment in \begin{equation}\begin{split}...\end{split}\end{equation} is properly displayed. If called with an argument count, the corresponding number of outward nested environments is treated as inner levels.
C-c C-p C-s
preview-section
Preview/Generate previews for section
Run preview on this LaTeX section.
C-c C-p C-r
preview-region (begin end)
Preview/Generate previews for region
Run preview on current region (between point and mark). If called non-interactively, runs preview on region between begin and end.
C-c C-p C-b
preview-buffer
Preview/Generate previews for buffer
Run preview on the present buffer.
C-c C-p C-d
preview-document
Preview/Generate previews for document
Run preview on the present document.
C-c C-p C-c C-p
preview-clearout-at-point
Preview/Remove previews at point
Clear out (remove) the previews that are immediately adjacent to point.
C-c C-p C-c C-s
preview-clearout-section
Preview/Remove previews from section
Clear out all previews in current section.
C-c C-p C-c C-r
preview-clearout (&optional start end keep-dir)
Preview/Remove previews from region
Clear out all previews in the current region. When called interactively, the current region is used. Non-interactively, the region between start and end is affected. Those two values default to the borders of the entire buffer. If keep-dir is set to a value from TeX-active-tempdir, previews associated with that directory are kept.
C-c C-p C-c C-b
preview-clearout-buffer (&optional buffer)
Preview/Remove previews from buffer
Clear out all previews in current buffer. This makes the current buffer lose all previews. If run non-interactively buffer is cleared out from previews, current buffer if nil.
C-c C-p C-c C-d
preview-clearout-document
Preview/Remove previews from document
Clear out all previews in current document. The document consists of all buffers that have the same master file as the current buffer. This makes the current document lose all previews.
C-c C-p C-f
preview-cache-preamble
Preview/Turn preamble cache on
Dump a pregenerated format file. For the rest of the session, this file is used when running on the same master file. Use this if you know your LaTeX takes a long time to start up, the speedup will be most noticeable when generating single or few previews. If you change your preamble, do this again. preview-latex will try to detect the necessity of that automatically when editing changes to the preamble are done from within Emacs, but it will not notice if the preamble effectively changes because some included file or style file is tampered with.
C-c C-p C-c C-f
preview-cache-preamble-off
Preview/Turn preamble cache off
Clear the pregenerated format file and stop using preambles for the current document. If the caching gives you problems, use this.
C-c C-p C-w
preview-copy-region-as-mml
Copy a region as MML
This option is also available as a variant in the context menu on the right mouse button (where the region is the preview that has been clicked on). It copies a string into the kill buffer that will in MML mode (as is used in gnus' message mode) cause the a reference to the respective image file to be inserted into the mail or news article. If you regenerate or otherwise kill the preview in its source buffer before the mail or news gets posted, this will fail. Also you should generate images you want to send with preview-transparent-border set to nil, or the images will have an ugly border. Preview your mail with M-m P to make sure it looks fine.
C-c C-p C-i
preview-goto-info-page
Preview/Read Documentation
Read the info manual.
M-x preview-report-bug <RET>
preview-report-bug
Preview/Report Bug
This is the preferred way of reporting bugs as it will fill in what version of preview-latex you are using as well as versions of relevant other software, and also some of the more important settings. Please use this method of reporting, if at all possible and before reporting a bug, have a look at Known problems.
C-c C-k
LaTeX/TeX Output/Kill Job
Kills the preview-generating process. This is really an AUCTeX keybinding, but it is included here as a hint. If you are generating a preview and then make a change to the buffer, preview-latex may be confused and place the previews wrong.