Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log pathnames support #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions latexrun
Original file line number Diff line number Diff line change
Expand Up @@ -860,19 +860,20 @@ class LaTeX(Task):
really early. The output name may be None if there were no
pages of output.
"""
stdout = stdout.replace('\n', '').replace('\r', '')
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 "?(.*\.[^ ."]+)"?\s+\([0-9]+ page',
stdout, re.MULTILINE | re.DOTALL):
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!$',
re.search(r'No pages of output\.$|^! Emergency stop\.'
r'|! ==> Fatal error occurred, no output PDF file produced!',
stdout, re.MULTILINE):
print(stdout, file=sys.stderr)
raise TaskError('failed to extract output name from latex log')
Expand Down