FS#65535 - [python-matplotlib] Add texlive-latexextra as Optional Deps

Attached to Project: Community Packages
Opened by Ashwin Vishnu (jadelord) - Monday, 17 February 2020, 22:21 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Wednesday, 04 March 2020, 11:34 GMT
Task Type General Gripe
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Activating usetex `plt.rc("text", usetex=True)` and plotting with a latex string would spit out an error as mentioned here: https://bbs.archlinux.org/viewtopic.php?id=186228


Additional info:
* GH issue with error: https://github.com/matplotlib/matplotlib/issues/3410

Therefore please also add texlive-latexextra as an optional dependency.

❯ pacman -F type1cm.sty
extra/texlive-latexextra 2019.52575-1 (texlive-most) [installed]
usr/share/texmf-dist/tex/latex/type1cm/type1cm.sty
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Wednesday, 04 March 2020, 11:34 GMT
Reason for closing:  Implemented
Additional comments about closing:  python-matplotlib 3.2.0-1.
Comment by Ashwin Vishnu (jadelord) - Monday, 17 February 2020, 22:24 GMT
Sorry, forgot to add the [python-matplotlib] prefix!
Comment by Bruno Pagani (ArchangeGabriel) - Monday, 17 February 2020, 23:28 GMT
I’m not really sure about this, because it’s not strictly necessary —I use LaTeX with matplotlib without this package. It depends on what kind of option you enable in matplotlib, what preamble you use, etc.

My opinion on this is people should install the relevant texlive packages depending on what they want to use in matplotlib, because technically all texlive packages could be optdeps if you go this way.
Comment by Ashwin Vishnu (jadelord) - Monday, 17 February 2020, 23:36 GMT
It would be informative... plus you already have two optional dependencies which are insufficient for activating usetex.

'ghostscript: usetex dependencies'
'texlive-bin: usetex dependencies'

No other preamble is required.
Comment by Bruno Pagani (ArchangeGabriel) - Monday, 17 February 2020, 23:37 GMT
Yes, those are the only ones that are mandatory. Anything else depends on your LaTeX configuration.
Comment by Ashwin Vishnu (jadelord) - Monday, 17 February 2020, 23:45 GMT
I don't see how you can use usetex=True, without type1cm. The documentation also clearly mentions this is a common issue:

https://github.com/matplotlib/matplotlib/blob/e3177f83220a3cbfdb6984d263bb008279215458/tutorials/text/usetex.py#L123-L126

I would not comment any further. Your call.
Comment by Bruno Pagani (ArchangeGabriel) - Tuesday, 18 February 2020, 11:11 GMT
By using the PGF backend (and thus compiling with Type 42 fonts through XeLaTeX or LuaLaTeX), which is what I do. But I can understand this is not the average use case.

I will add 'texlive-latexextra: usetex usage with pdflatex'.

Loading...