Skip to content

Commit

Permalink
Fix _parse_jobname to handle intermediate font generation
Browse files Browse the repository at this point in the history
This fixes aclements#46.
  • Loading branch information
aslushnikov committed Mar 30, 2017
1 parent 38ff6ec commit 566809a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions latexrun
Original file line number Diff line number Diff line change
Expand Up @@ -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!$',
Expand Down

0 comments on commit 566809a

Please sign in to comment.