From 0592a7073fa5b944eb91588b53b1f654edb181a6 Mon Sep 17 00:00:00 2001 From: Nick Thurmes Date: Fri, 8 Apr 2022 01:34:07 -0600 Subject: [PATCH 1/2] Crudely wrap jobname in quotes --- run_lualatex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_lualatex.py b/run_lualatex.py index c8ccf62..5b2180d 100644 --- a/run_lualatex.py +++ b/run_lualatex.py @@ -66,7 +66,7 @@ return_code = subprocess.call( args=[ latexrun_file, - "--latex-args=-shell-escape -jobname=" + job_name, + "--latex-args=-shell-escape -jobname='" + job_name + "'", "--latex-cmd=lualatex", "-Wall", ] + sys.argv[ARGS_COUNT:] + [main_file], From 61b67cd36737e7d98fb709844e20d2172ad57865 Mon Sep 17 00:00:00 2001 From: Nick Thurmes Date: Fri, 8 Apr 2022 01:52:51 -0600 Subject: [PATCH 2/2] Escape any ' in the existing jobname --- run_lualatex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_lualatex.py b/run_lualatex.py index 5b2180d..81e9740 100644 --- a/run_lualatex.py +++ b/run_lualatex.py @@ -66,7 +66,7 @@ return_code = subprocess.call( args=[ latexrun_file, - "--latex-args=-shell-escape -jobname='" + job_name + "'", + "--latex-args=-shell-escape -jobname='" + job_name.replace("'", "'\\''") + "'", "--latex-cmd=lualatex", "-Wall", ] + sys.argv[ARGS_COUNT:] + [main_file],