diff --git a/pylatex/document.py b/pylatex/document.py index 158a0bf5..e7ade765 100644 --- a/pylatex/document.py +++ b/pylatex/document.py @@ -302,8 +302,6 @@ def generate_pdf( compilers = (("latexmk", latexmk_args), ("pdflatex", [])) - main_arguments = ["--interaction=nonstopmode", filepath + ".tex"] - check_output_kwargs = {} if python_cwd_available: check_output_kwargs = {"cwd": dest_dir} @@ -311,6 +309,11 @@ def generate_pdf( os_error = None for compiler, arguments in compilers: + if compiler == "tectonic": + main_arguments = [filepath + ".tex"] + else: + main_arguments = ["--interaction=nonstopmode", filepath + ".tex"] + command = [compiler] + arguments + compiler_args + main_arguments try: