From 468d1ae1185b36435d7a6c3fd4a6a0ed0bd990ac Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sat, 13 Oct 2018 18:53:45 +0200 Subject: [PATCH] Deal gracefully with multiple 'Transcript written on' lines. Whenever pdflatex is invoked on a clean copy of the texmf, it will first invoke mktexfmt and various font conversion tools. These will also cause pdflatex to print 'Transcript written on' lines for those steps. The existing regular expression does greedy matching, meaning that the full log output between the steps is parsed as the job name, causing latexrun to attempt to open non-existent files. --- latexrun | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latexrun b/latexrun index b669d9f..80d68ec 100755 --- a/latexrun +++ b/latexrun @@ -861,7 +861,7 @@ class LaTeX(Task): pages of output. """ jobname = outname = None - for m in re.finditer(r'^Transcript written on "?(.*)\.log"?\.$', stdout, + for m in re.finditer(r'^Transcript written on "?(.*?)\.log"?\.$', stdout, re.MULTILINE | re.DOTALL): jobname = m.group(1).replace('\n', '') if jobname is None: