## 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. But there are still pieces of mathematics they are not handled by MathJax, such as commutative diagrams written using the `tikz-cd` package. 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. If unspecified, the default is specified by the imager. Note that not all imagers are compatible with all compilers. Specifically, some imagers need compilers that produces pdf’s and others need dvi’s.

LaTeX program to use to compile vector image document

  Command-Line Options: --vector-image-compiler=program
  Config File: [ images ] vector-compiler
  Default: latex
  specifies which program to use to compile the vector images LaTeX document. If unspecified, this uses the value of --image-compiler.

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: gspdfpng pdftoppm dvipng dvi2bitmap gsdvipng 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: pdf2svg 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.

Save temporary files for debugging

  Command-Line Options: --save-image-file or --delete-image-file
  Config File: [ images ] save-file
  Default: no
  specifies whether the temporary images.tex file should be retained after compilation. It can be useful to retain the images for debugging purposes.

Scale factor of image

  Command-Line Options: --image-scale-factor
  Config File: [ images ] scale-factor
  Default: 1.0
  the default scale factor to apply to images after compilation. Not all imagers respect this option.

Scale factor for given node type

  Command-Line Options: --scales=node-name scale_factor
  specifies the image scale factor for the specified type of node. Not all imagers respect this option.