TeX: Add rasterers for PDFs and PostScript files to default config.ini
@@ -13,6 +13,21 @@ texlive_path = /usr/share/texlive/
# This is the directory that contains the 'pdflatex' and 'latex' binaries.
texlive_bin_path = /usr/bin/
+# Commands for rastering TeX output files into images.
+# Each key is the extension for a type of TeX output (e.g., 'pdf', 'ps').
+# Each value is a command that converts files of that type into PNGs. The
+# command should produce one file named "page-#.png" for each page in the file,
+# starting at page-1.png. Commands should be provided as a Python list.
+# Aguments should contain placeholders for two pipeline-provided values,
+# in Python string template format:
+# - {output_dir}: the command must output PNGs to this directory
+# - {file}: the command must raster the file at the path specified by {file}
+# '%' signs in commands must be escaped:
+# https://docs.python.org/3/library/configparser.html#configparser.BasicInterpolation
+[rasterers]
+pdf = ["gs", "-sDEVICE=png16m", "-o", "{output_dir}/page-%%d.png", "{file}"]
+ps = ["gs", "-sDEVICE=png16m", "-o", "{output_dir}/page-%%d.png", "{file}"]
+
# Path to Perl. Perl is used by the data processing scripts to invoke AutoTeX.
# It cannot be a recent version (AutoTeX uses deprecated language features).
# Delete this section if you want the scripts to use your system's default Perl.
