Variable: org-preview-latex-process-alist
org-preview-latex-process-alist is a customizable variable defined in
org.el.gz.
Value
((dvipng :programs ("latex" "dvipng") :description "dvi > png"
:message
"you need to install the programs: latex and dvipng."
:image-input-type "dvi" :image-output-type "png"
:image-size-adjust (1.0 . 1.0) :latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter ("dvipng -D %D -T tight -o %O %f")
:transparent-image-converter
("dvipng -D %D -T tight -bg Transparent -o %O %f"))
(dvisvgm :programs ("latex" "dvisvgm") :description "dvi > svg"
:message
"you need to install the programs: latex and dvisvgm."
:image-input-type "dvi" :image-output-type "svg"
:image-size-adjust (1.7 . 1.5) :latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O"))
(imagemagick :programs ("latex" "convert") :description "pdf > png"
:message
"you need to install the programs: latex and imagemagick."
:image-input-type "pdf" :image-output-type "png"
:image-size-adjust (1.0 . 1.0) :latex-compiler
("pdflatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %O")))
Documentation
Definitions of external processes for LaTeX previewing.
Org mode can use some external commands to generate TeX snippet's images for
previewing or inserting into HTML files, e.g., "dvipng". This variable tells
org-create-formula-image how to call them.
The value is an alist with the pattern (NAME . PROPERTIES). NAME is a symbol. PROPERTIES accepts the following attributes:
:programs list of strings, required programs.
:description string, describe the process.
:message string, message it when required programs cannot be found.
:image-input-type string, input file type of image converter (e.g., "dvi").
:image-output-type string, output file type of image converter (e.g., "png").
:image-size-adjust cons of numbers, the car element is used to adjust LaTeX
image size showed in buffer and the cdr element is for
HTML file. This option is only useful for process
developers, users should use variable
org-format-latex-options instead.
:post-clean list of strings, files matched are to be cleaned up once
the image is generated. When nil, the files with ".dvi",
".xdv", ".pdf", ".tex", ".aux", ".log", ".svg",
".png", ".jpg", ".jpeg" or ".out" extension will
be cleaned up.
:latex-header list of strings, the LaTeX header of the snippet file.
When nil, the fallback value is used instead, which is
controlled by org-format-latex-header,
org-latex-default-packages-alist and
org-latex-packages-alist, which see.
:latex-compiler list of LaTeX commands, as strings. Each of them is given
to the shell. Place-holders "%t", "%b" and "%o" are
replaced with values defined below.
:image-converter list of image converter commands strings. Each of them is
given to the shell and supports any of the following
place-holders defined below.
If set, :transparent-image-converter is used instead of :image-converter to convert an image when the background color is nil or "Transparent".
Place-holders used by :image-converter and :latex-compiler:
%f input file name
%b base name of input file
%o base directory of input file
%O absolute output file name
Place-holders only used by :image-converter:
%D dpi, which is used to adjust image size by some processing commands.
%S the image size scale ratio, which is used to adjust image size by some
processing commands.
This variable was added, or its default value changed, in Org version
9.6.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defcustom org-preview-latex-process-alist
'((dvipng
:programs ("latex" "dvipng")
:description "dvi > png"
:message "you need to install the programs: latex and dvipng."
:image-input-type "dvi"
:image-output-type "png"
:image-size-adjust (1.0 . 1.0)
:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
:image-converter ("dvipng -D %D -T tight -o %O %f")
:transparent-image-converter
("dvipng -D %D -T tight -bg Transparent -o %O %f"))
(dvisvgm
:programs ("latex" "dvisvgm")
:description "dvi > svg"
:message "you need to install the programs: latex and dvisvgm."
:image-input-type "dvi"
:image-output-type "svg"
:image-size-adjust (1.7 . 1.5)
:latex-compiler ("latex -interaction nonstopmode -output-directory %o %f")
:image-converter ("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O"))
(imagemagick
:programs ("latex" "convert")
:description "pdf > png"
:message "you need to install the programs: latex and imagemagick."
:image-input-type "pdf"
:image-output-type "png"
:image-size-adjust (1.0 . 1.0)
:latex-compiler ("pdflatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %O")))
"Definitions of external processes for LaTeX previewing.
Org mode can use some external commands to generate TeX snippet's images for
previewing or inserting into HTML files, e.g., \"dvipng\". This variable tells
`org-create-formula-image' how to call them.
The value is an alist with the pattern (NAME . PROPERTIES). NAME is a symbol.
PROPERTIES accepts the following attributes:
:programs list of strings, required programs.
:description string, describe the process.
:message string, message it when required programs cannot be found.
:image-input-type string, input file type of image converter (e.g., \"dvi\").
:image-output-type string, output file type of image converter (e.g., \"png\").
:image-size-adjust cons of numbers, the car element is used to adjust LaTeX
image size showed in buffer and the cdr element is for
HTML file. This option is only useful for process
developers, users should use variable
`org-format-latex-options' instead.
:post-clean list of strings, files matched are to be cleaned up once
the image is generated. When nil, the files with \".dvi\",
\".xdv\", \".pdf\", \".tex\", \".aux\", \".log\", \".svg\",
\".png\", \".jpg\", \".jpeg\" or \".out\" extension will
be cleaned up.
:latex-header list of strings, the LaTeX header of the snippet file.
When nil, the fallback value is used instead, which is
controlled by `org-format-latex-header',
`org-latex-default-packages-alist' and
`org-latex-packages-alist', which see.
:latex-compiler list of LaTeX commands, as strings. Each of them is given
to the shell. Place-holders \"%t\", \"%b\" and \"%o\" are
replaced with values defined below.
:image-converter list of image converter commands strings. Each of them is
given to the shell and supports any of the following
place-holders defined below.
If set, :transparent-image-converter is used instead of :image-converter to
convert an image when the background color is nil or \"Transparent\".
Place-holders used by `:image-converter' and `:latex-compiler':
%f input file name
%b base name of input file
%o base directory of input file
%O absolute output file name
Place-holders only used by `:image-converter':
%D dpi, which is used to adjust image size by some processing commands.
%S the image size scale ratio, which is used to adjust image size by some
processing commands."
:group 'org-latex
:package-version '(Org . "9.6")
:type '(alist :tag "LaTeX to image backends"
:value-type (plist)))