Skip to content

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

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

Merged
merged 6 commits into from
Oct 16, 2021

Conversation

uihsnv
Copy link
Contributor

@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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@anntzer
Copy link
Contributor

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
Contributor Author

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
Member

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

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".

@tacaswell tacaswell marked this pull request as ready for review October 13, 2021 19:52
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
@timhoffm timhoffm merged commit 3e9425f into matplotlib:master Oct 16, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 16, 2021
timhoffm added a commit that referenced this pull request Oct 16, 2021
…708-on-v3.5.x

Backport PR #20708 on branch v3.5.x (Describe possible need for loading the 'lmodern' package when using PGF files)
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
Describe possible need for loading the 'lmodern' package when using PGF files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants