Next: , Previous: , Up: Embedded LaTeX   [Contents][Index]


12.5.2 Previewing LaTeX fragments

If you have a working LaTeX installation and ‘dvipng’, ‘dvisvgm’ or ‘convert’ installed112, LaTeX fragments can be processed to produce images of the typeset expressions to be used for inclusion while exporting to HTML (see LaTeX fragments), or for inline previewing within Org mode.

You can customize the variables org-format-latex-options and org-format-latex-header to influence some aspects of the preview. In particular, the :scale (and for HTML export, :html-scale) property of the former can be used to adjust the size of the preview images.

C-c C-x C-l (org-latex-preview)

Produce a preview image of the LaTeX fragment at point and overlay it over the source code. If there is no fragment at point, process all fragments in the current entry—between two headlines.

When called with a single prefix argument, clear all images in the current entry. Two prefix arguments produce a preview image for all fragments in the buffer, while three of them clear all the images in that buffer.

You can turn on the previewing of all LaTeX fragments in a file with

#+STARTUP: latexpreview

To disable it, simply use

#+STARTUP: nolatexpreview

Footnotes

(112)

These are respectively available at http://sourceforge.net/projects/dvipng/, http://dvisvgm.bplaced.net/ and from the ImageMagick suite. Choose the converter by setting the variable org-preview-latex-default-process accordingly.