From b5d227cc6b41d3da0a138dbbc45551144704451b Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sun, 11 Feb 2024 23:08:45 +0100 Subject: [PATCH] clean the auxiliary files after latex run --- rendercv/renderer.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 60e0434..06e281a 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -543,6 +543,15 @@ def latex_to_pdf(latex_file_path: pathlib.Path) -> pathlib.Path: "If you can't solve the problem, please open an issue on GitHub.", ) + # clean the auxiliary files: + subprocess.run( + command + ["-c"], + cwd=latex_file_path.parent, + stdout=subprocess.DEVNULL, # don't capture the output + stderr=subprocess.DEVNULL, # don't capture the error + stdin=subprocess.DEVNULL, # don't allow TinyTeX to ask for user input + ) + # check if the PDF file is generated: pdf_file_path = latex_file_path.with_suffix(".pdf") if not pdf_file_path.is_file():