Package: python3-matplotlib
Source: matplotlib (3.5.1-2)
Version: 3.5.1-2+b1

Run a plot script that contains

    from matplotlib import rc
    rc('text', usetex=True)

and makes use of LaTeX markup (some labels containing "$...$").

Execution will fail with a long traceback and an error message from LaTeX,
appended below.

Cause:

According to https://github.com/matplotlib/matplotlib/issues/16911,
Matplotlib v3.2.1 introduced the dependence on file type1ec.sty
"so that unicode input works (#14146 and linked issues)".

Proposed solution:

Add package cm-super-minimal to list of suggested packages.

In a separate report, I will propose to elevate LaTeX dependencies
from "Suggests" to "Recommends" or "Depends".


## Error message

Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 233, in _run_checked_subprocess
    report = subprocess.check_output(
  File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['latex', '-interaction=nonstopmode', '--halt-on-error', '../1acea6f6c115d0ec7a634ed0529287b9.tex']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
    return self.func(*args)
  File "/usr/lib/python3.10/tkinter/__init__.py", line 839, in callit
    func(*args)
File "/usr/lib/python3/dist-packages/matplotlib/backends/_backend_tk.py", line 251, in idle_draw
    self.draw()
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_tkagg.py", line 9, in draw
    super().draw()
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_agg.py", line 436, in draw
    self.figure.draw(self.renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 73, in draw_wrapper
    result = draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 2810, in draw
    mimage._draw_list_compositing_images(
File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 132, in _draw_list_compositing_images
    a.draw(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
    return draw(artist, renderer)
File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 3082, in draw
    mimage._draw_list_compositing_images(
File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 132, in _draw_list_compositing_images
    a.draw(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
    return draw(artist, renderer)
  File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1159, in draw
    ticklabelBoxes, ticklabelBoxes2 = self._get_tick_bboxes(ticks_to_draw,
File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1085, in _get_tick_bboxes
    return ([tick.label1.get_window_extent(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/axis.py", line 1085, in <listcomp>
    return ([tick.label1.get_window_extent(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/text.py", line 910, in get_window_extent
    bbox, info, descent = self._get_layout(self._renderer)
File "/usr/lib/python3/dist-packages/matplotlib/text.py", line 309, in _get_layout
    _, lp_h, lp_d = renderer.get_text_width_height_descent(
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_agg.py", line 259, in get_text_width_height_descent
    w, h, d = texmanager.get_text_width_height_descent(
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 335, in get_text_width_height_descent
    dvifile = self.make_dvi(tex, fontsize)
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 271, in make_dvi
    self._run_checked_subprocess(
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 241, in _run_checked_subprocess
    raise RuntimeError(
RuntimeError: latex was not able to process the following string:
b'lp'

Here is the full report generated by latex:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(../1acea6f6c115d0ec7a634ed0529287b9.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)

! LaTeX Error: File `type1ec.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.6 \usepackage
               [utf8]{inputenc}^^M
No pages of output.
Transcript written on 1acea6f6c115d0ec7a634ed0529287b9.log.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to