Next: , Previous: LaTeX fragments, Up: Embedded LaTeX

11.8.2 Previewing LaTeX fragments

If you have a working LaTeX installation and dvipng, dvisvgm or convert installed1, 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
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 prefix argument, process the entire subtree. When called with two prefix arguments, or when the cursor is before the first headline, process the entire buffer.
C-c C-c
Remove the overlay preview images.

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

     #+STARTUP: latexpreview

To disable it, simply use

     #+STARTUP: nolatexpreview


[1] These are respectively available at, and from the imagemagick suite. Choose the converter by setting the variable org-preview-latex-default-process accordingly.