Skip to content

Commit

Permalink
Help troubleshooting of latex failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Jul 17, 2022
1 parent b5c535b commit e8acd57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/matplotlib/backends/backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,10 @@ def __init__(self):
test_input = self.latex_header + latex_end
stdout, stderr = latex.communicate(test_input)
if latex.returncode != 0:
raise LatexError("LaTeX returned an error, probably missing font "
"or error in preamble.", stdout)
raise LatexError(
f"LaTeX errored (probably missing font or error in preamble) "
f"while processing the following input:\n{test_input}",
stdout)

self.latex = None # Will be set up on first use.
# Per-instance cache.
Expand Down

0 comments on commit e8acd57

Please sign in to comment.