8000 Include tex output in pdf LatexError. by anntzer · Pull Request #19468 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Include tex output in pdf LatexError. #19468

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

Merged
merged 1 commit into from
Feb 8, 2021
Merged
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
8 changes: 7 additions & 1 deletion lib/matplotlib/backends/backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ def __init__(self, message, latex_output=""):
super().__init__(message)
self.latex_output = latex_output

def __str__(self):
s, = self.args
if self.latex_output:
s += "\n" + self.latex_output
return s


class LatexManager:
"""
Expand Down Expand Up @@ -286,7 +292,7 @@ def __init__(self):
stdout, stderr = latex.communicate(test_input)
if latex.returncode != 0:
raise LatexError("LaTeX returned an error, probably missing font "
"or error in preamble:\n%s" % stdout)
"or error in preamble.", stdout)

self.latex = None # Will be set up on first use.
self.str_cache = {} # cache for strings already processed
Expand Down
0