#1010216 usetex=True won't work without file type1ec.sty from package cm-super-minimal

Package:
python3-matplotlib
Source:
matplotlib
Description:
Python based plotting system in a style similar to Matlab (Python 3)
Submitter:
Joachim Wuttke
Date:
2022-06-23 00:39:03 UTC
Severity:
normal
#1010216#5
Date:
2022-04-26 15:25:37 UTC
From:
To:
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.

#1010216#16
Date:
2022-06-23 00:35:25 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
matplotlib, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1010216@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sandro Tosi <morph@debian.org> (supplier of updated matplotlib package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 22 Jun 2022 20:14:39 -0400
Source: matplotlib
Architecture: source
Version: 3.5.2-1
Distribution: unstable
Urgency: medium
Maintainer: Sandro Tosi <morph@debian.org>
Changed-By: Sandro Tosi <morph@debian.org>
Closes: 1010216
Changes:
 matplotlib (3.5.2-1) unstable; urgency=medium
 .
   * New upstream release
   * debian/patches/
     - refresh/drop patches
   * debian/control
     - add cm-super-minimal to matplotlib Suggests; Closes: #1010216
     - bump Standards-Version to 4.6.1 (no changes needed)
 .
   [ Laurent Bigonville ]
   * debian/control
     - Mark python-matplotlib-doc with <!nodoc> build-profile
   * debian/rules
     - Do not build the doc if the <nodoc> profile is set
Checksums-Sha1:
 e7827e6b92187e1345833ba2806c3faeac10ceaf 3605 matplotlib_3.5.2-1.dsc
 86838b65fe028e0956f23736dd8e0e78a58a8e46 28156568 matplotlib_3.5.2.orig.tar.xz
 cd3dd1f3d8515b7bcce7fece6971dd9de455f37a 31908 matplotlib_3.5.2-1.debian.tar.xz
 76a28a5e45491069dd10b671d213b0a2a0f24084 24795 matplotlib_3.5.2-1_source.buildinfo
Checksums-Sha256:
 c62c9f9c0124b650586abfad2ea5aafab73289e6b72e06c8719786a4457d1885 3605 matplotlib_3.5.2-1.dsc
 16f1847ee5d4d36aec86cbb2d25fbfa862f1686f8a5cbdd1006519fc035e7392 28156568 matplotlib_3.5.2.orig.tar.xz
 fbc5dccca6dafd093885051a7a74801eb124b31f247210ee68dc27ffad5583f5 31908 matplotlib_3.5.2-1.debian.tar.xz
 b70da54cb2e3d1b04e0a008c176dbc6e737eb38a06bf4aa670c2d698bbf739aa 24795 matplotlib_3.5.2-1_source.buildinfo
Files:
 1d35237a60aef9a737e2b077ce5f35e3 3605 python optional matplotlib_3.5.2-1.dsc
 613817d2fa380b761e9da880f25d6d8b 28156568 python optional matplotlib_3.5.2.orig.tar.xz
 1e9b9ad8ff4805e2166cba694ce6758b 31908 python optional matplotlib_3.5.2-1.debian.tar.xz
 d3547317e0212a167591d46b13eb85ac 24795 python optional matplotlib_3.5.2-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEufrTGSrz5KUwnZ05h588mTgBqU8FAmKzsJkACgkQh588mTgB
qU8kVhAAn4RAwioK9dWE884tbWX4opprbTLdpkDBLoS1KnJZ+VDbR3gilU5e4b43
0U6TIEm7x4mU0GG9RsFeUdeaMzgA1GBu/IRKMdDI5ARQyo3puu9Wjw+1gscObMID
Qxt688+xLsT0TxQZVgBwq7F0er12jCF+YioWo+o//DnHcebbVp8W1ljGZ2OM2RNv
GPP92//yrpRQIOQ4UA6LaUVphqp2THdGfmky6ogFXwdss1kRDoWngn7Gd1Pzrxq8
JzxpFNSUxOB0p4old79mIhYTYlZWcf0DnYxPGqwyltRKySfUpH68VsHmMZwVsaLW
j2bYqMcnrEC6HiuqoFXpa7ORJgJsGaOYHzHLB9O5yn70WYoRSwLqyltCBSJWMSvJ
+jWRWt+NzQ5LgB5KVlDYxtbgZiq8cbQWCHWAOtoB26ExlhdN7o2wA08zT8NtBybh
1bFCczlOSS+YCVwAztcB3Cp6PfmH/OFtFTfzeM8/AJu87cWJu65ey+MQvMPB9pgz
fki3ZVjicD4snk2fJ3Gi3A5ztR3K/4sfVd6kIqFWfIgW3FLuSUgKOLi+8o+Cjim1
pkX0HCB/gh1DX4SWMFVFl53utRnKtsuHZg5xeUM+FKd0bTIgzTj6B+yu2eLNZHoj
yaRHQ5fAhSoN1rmvDAuARJabyC/mwKapWNngYz6WMJTVtc4tIuQ=
=XiDa
-----END PGP SIGNATURE-----