From ced6dac36188c845d7d06e5768e484b4b774d028 Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Sat, 10 Oct 2020 16:45:55 -0700 Subject: Allow the user to specify which LaTeX compiler to use (#8) We were using pdflatex as a default LaTeX compiler. This PR allows the user to specify any of the ones shipped with TeXLive. This is particularly important because some applications require, e.g., Times New Roman font. In PDFLatex, it looks like it's basically impossible to guarantee this. In XeLaTeX and LuaLaTeX it seems to be possible. So having the option to switch between them can be useful. --- run_latex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'run_latex.py') diff --git a/run_latex.py b/run_latex.py index 9f4b75e..32b44cf 100644 --- a/run_latex.py +++ b/run_latex.py @@ -21,7 +21,7 @@ import shutil import subprocess import sys -texlive, latexrun, job_name, main_file, output_file = sys.argv[1:6] +texlive, latexrun, compiler, job_name, main_file, output_file = sys.argv[1:7] sources = sys.argv[6:] if output_file == "--": run_after = sources[sources.index("--"):][1:] @@ -48,7 +48,7 @@ return_code = subprocess.call( "python3", latexrun, "--latex-args=-jobname=" + job_name, - "--latex-cmd=pdflatex", + "--latex-cmd=" + compiler, "--bibtex-cmd=bibtex", "-Wall", main_file, -- cgit v1.2.3