Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe possible need for loading the 'lmodern' package when using PGF files #20708

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

@uihsnv
Copy link

@uihsnv uihsnv commented Jul 21, 2021

PR Summary

The PR adds a suggestion to use the lmodern package when using .pgf files generated by Matplotlib. Changes are made both to a documentation page as well as the commented preamble printed in every generated .pgf file.

This was found to be necessary specifically in the case of a math-bold-faced, uppercase Greek letter 'delta' was not rendered when the lmodern package was not loaded.

See discussion for more details:
https://matrix.to/#/!BXmyZMTnRjWJldDRLV:gitter.im/$M7KxLQuyUosx2byFxIsKJE8QS_14NRiWqmmlb6nSIfE?via=gitter.im&via=matrix.org

PR Checklist

  • [N/A] Has pytest style unit tests (and pytest passes).
  • [N/A] Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
Copy link

@github-actions github-actions bot left a comment

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

tutorials/text/pgf.py Outdated Show resolved Hide resolved
@jklymak jklymak marked this pull request as draft Jul 22, 2021
@jklymak jklymak added this to the v3.5.0 milestone Jul 22, 2021
@anntzer
Copy link
Contributor

@anntzer anntzer commented Jul 22, 2021

I would have thought(?) that this is rather a standard TeX limitation (https://texfaq.org/FAQ-boldgreek, https://tex.stackexchange.com/questions/595) and may not warrant a specific doc entry on our side?

@uihsnv
Copy link
Author

@uihsnv uihsnv commented Jul 22, 2021

@anntzer Those links describe a related issue of \mathbf{} not sufficiently emboldening some Greek font. But here, the very font was missing when compiling without the lmodern package.

@jklymak
Copy link
Contributor

@jklymak jklymak commented Jul 22, 2021

I think the mystery here is what combination of factors do you need to trigger this problem. I've never come across a LaTeX install that requires \include{lmodern}for most typesetting needs.

@tacaswell
Copy link
Member

@tacaswell tacaswell commented Jul 22, 2021

On one hand, that we have this issue is super weird (and as discussed on gitter it seems to depend on which LaTeX engine you use) and may actually be caused by something inside of the pgf package.

Given that this work around does fix the problem, I am in favor of including a note about this and opening a new issue in the spirit of "sort out when / why / if lmodern is actually needed".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants