Skip to content

type1ec.sty needed for TeX output of plots. Not a standard texlive #16911

Closed

Description

@LRydin

Bug report

Bug summary

type1ec.sty not found. I have never encountered this before v3.2.1. Standard texlive (apt install texlive-latex-extra) does not come with this (only type1cm.sty).

Code for reproduction

import numpy as np
import matplotlib
matplotlib.rcParams['pgf.texsystem'] = 'pdflatex'
matplotlib.rcParams.update({'font.family': 'serif', 'font.size': 18,
    'axes.labelsize': 20,'axes.titlesize': 24, 'figure.titlesize' : 28})
matplotlib.rcParams['text.usetex'] = True
import matplotlib.pyplot as plt

fig, ax = plt.subplots(1,1)
x = np.random.norm(0,1)
y = np.random.norm(0,2)
ax.plot(x,y, label='a label')
ax.legend(fontsize=15)

Actual outcome

Sorry for the short description,

...
type1ec.sty not found.
...

Expected outcome

Expected no problems with plotting. `fontsize=12` runs on some choices of label. Labels with a single character also produce no error...

Fix
on linux: apt install cm-super.

Is it now necessary to have cm-supper for plotting TeX?

Matplotlib version

  • Operating system: Linux (Ubuntu 19.10)
  • Matplotlib version: 3.2.1
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline (seems strange to me)
  • Python version: 3.7.6
  • Jupyter version (if applicable): 6.0.3
  • Other libraries:

Activity

  1. anntzer commented on Mar 26, 2020

    @anntzer
    Contributor

    Yes, this has been made necessary so that unicode input works (#14146 and linked issues).

  2. LRydin commented on Mar 26, 2020

    @LRydin
    Author

    Wonderful, thanks. If not included in the documentation, I would say it is helpful to do so :)

    Cheers

  3. RiteshBhola commented on Nov 16, 2020

    @RiteshBhola

    Thank you
    It solved my issue.

  4. zhu00ling commented on May 26, 2021

    @zhu00ling

    i solved this bug on ubuntu by adding the cm-super. but the same bug appears on mac.

  5. added this to the v3.3.0 milestone on May 26, 2021
  6. sanurielf commented on Sep 12, 2021

    @sanurielf

    i solved this bug on ubuntu by adding the cm-super. but the same bug appears on mac.

    I solved using tlmgr in OSX:

    sudo tlmgr install cm-super

  7. ale-munozarancibia commented on Jul 28, 2023

    @ale-munozarancibia

    In Fedora 35, I kept having the "not found" error for type1ec.sty and type1cm.sty although both were installed. I was able to solve it installing texlive-psutils with dnf.

  8. shikhar-saxena commented on Aug 13, 2023

    @shikhar-saxena

    I keep getting the "not found" error too. And I couldn't fix it, despite installing cm-super?

  9. RiteshBhola commented on Aug 13, 2023

    @RiteshBhola
  10. shikhar-saxena commented on Aug 13, 2023

    @shikhar-saxena

    Yeah I have installed both of them but it doesn't work for some reason.

  11. OleHolmNielsen commented on Aug 1, 2024

    @OleHolmNielsen

    We struggled with finding an appropriate RPM package for RockyLinux 9 (clone of RHEL 9), and found that this package needs to be installed:

    dnf install texlive-type1cm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions