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

11.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-toggle-latex-fragment)

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 point is before the first headline, process the entire buffer.

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

#+STARTUP: latexpreview

To disable it, simply use

#+STARTUP: nolatexpreview



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