Skip to content

Commit e8acd57

Browse files
committed
Help troubleshooting of latex failures.
1 parent b5c535b commit e8acd57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,10 @@ def __init__(self):
310310
test_input = self.latex_header + latex_end
311311
stdout, stderr = latex.communicate(test_input)
312312
if latex.returncode != 0:
313-
raise LatexError("LaTeX returned an error, probably missing font "
314-
"or error in preamble.", stdout)
313+
raise LatexError(
314+
f"LaTeX errored (probably missing font or error in preamble) "
315+
f"while processing the following input:\n{test_input}",
316+
stdout)
315317

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

0 commit comments

Comments
 (0)