From 566809a5b8feecc16a13033f3036b6a3c84e8ed7 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 29 Mar 2017 22:41:23 -0700 Subject: [PATCH] Fix _parse_jobname to handle intermediate font generation This fixes #46. --- latexrun | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/latexrun b/latexrun index b669d9f..bff156d 100755 --- a/latexrun +++ b/latexrun @@ -861,15 +861,16 @@ 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: print(stdout, file=sys.stderr) raise TaskError('failed to extract job name from latex log') - for m in re.finditer(r'^Output written on "?(.*\.[^ ."]+)"? \([0-9]+ page', + for m in re.finditer(r'^Output written on "?(.*?\.[^ ."]+)"? \([0-9]+ (page)?', stdout, re.MULTILINE | re.DOTALL): - outname = m.group(1).replace('\n', '') + if m.group(2) == "page": + outname = m.group(1).replace('\n', '') if outname is None and not \ re.search(r'^No pages of output\.$|^! Emergency stop\.$' r'|^! ==> Fatal error occurred, no output PDF file produced!$',