2.1.6 Image Options

Images are created by renderers when the output type in incapable of rendering the content in any other way. This method was commonly used to display equations in XHTML output. Nowadays, MathJax arguably provides a better method, see Section 2.1.7 below. The following options control how images are generated.

Base URL


Command-Line Options: --image-base-url=url
Config File: [ images ] base-url
specifies a base URL to prepend to the path of all images.

LaTeX program to use to compile image document


Command-Line Options: --image-compiler=program
Config File: [ images ] compiler
Default: latex
specifies which program to use to compile the images LaTeX document.

Enable or disable image generation


Command-Line Options: --enable-images or --disable-images
Config File: [ images ] enabled
Default: yes
indicates whether or not images should be generated.

Enable or disable the image cache


Command-Line Options: --enable-image-cache or --disable-image-cache
Config File: [ images ] cache
Default: yes
indicates whether or not images should use a cache between runs.

Convert LaTeX output to images


Command-Line Options: --imager=program
Config File: [ images ] imager
Default: dvipng dvi2bitmap gsdvipng gspdfpng OSXCoreGraphics
specifies which converter will be used to take the output from the LaTeX compiler and convert it to images. You can specify a space delimited list of names as well. If a list of names is specified, each one is verified in order to see if it works on the current machine. The first one that succeeds is used.

You can use the value of “none” to turn the imager off.

Image filenames


Command-Line Options: --image-filenames=filename-template
Config File: [ images ] filenames
Default: images/img-$num(4).png
specifies the image naming template to use to generate filenames. This template is the same as the templates used by the --filename option.

Convert LaTeX output to vector images


Command-Line Options: --vector-imager=program
Config File: [ images ] vector-imager
Default: dvisvgm
specifies which converter will be used to take the output from the LaTeX compiler and convert it to vector images. You can specify a space delimited list of names as well. If a list of names is specified, each one is verified in order to see if it works on the current machine. The first one that succeeds is used.

You can use the value of “none” to turn the vector imager off.

Note: When using the vector imager, a bitmap image is also created using the regular imager. This bitmap is used to determine the depth information about the vector image and can also be used as a backup if the vector image is not supported by the viewer.