Skip to content

Commit e7d8961

Browse files
committed
Help troubleshooting of latex failures.
1 parent ecc25ca commit e7d8961

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/backends/backend_pgf.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,10 @@ def __init__(self):
312312
test_input = self.latex_header + latex_end
313313
stdout, stderr = latex.communicate(test_input)
314314
if latex.returncode != 0:
315-
raise LatexError("LaTeX returned an error, probably missing font "
316-
"or error in preamble.", stdout)
315+
raise LatexError(
316+
f"LaTeX errored (probably missing font or error in preamble) "
317+
f"while processing the following input:\n{test_input}",
318+
stdout)
317319

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

0 commit comments

Comments
 (0)