Skip to content

Commit 3e9425f

Browse files
authored
Merge pull request #20708 from uihsnv/lmodern-doc
Describe possible need for loading the 'lmodern' package when using PGF files
2 parents 3587a9f + eccdda1 commit 3e9425f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,10 @@ def _print_pgf_to_fh(self, fh, *, bbox_inches_restore=None):
801801
%% Make sure the required packages are loaded in your preamble
802802
%% \\usepackage{pgf}
803803
%%
804+
%% Also ensure that all the required font packages are loaded; for instance,
805+
%% the lmodern package is sometimes necessary when using math font.
806+
%% \\usepackage{lmodern}
807+
%%
804808
%% Figures using additional raster images can only be included by \\input if
805809
%% they are in the same directory as the main LaTeX file. For loading figures
806810
%% from other directories you can use the `import` package

tutorials/text/pgf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@
187187
using either the ``rasterized=True`` keyword, or ``.set_rasterized(True)`` as
188188
per :doc:`this example </gallery/misc/rasterization_demo>`.
189189
190+
* Various math fonts are compiled and rendered only if corresponding font
191+
packages are loaded. Specifically, when using ``\mathbf{}`` on Greek letters,
192+
the default computer modern font may not contain them, in which case the
193+
letter is not rendered. In such scenarios, the ``lmodern`` package should be
194+
loaded.
195+
190196
* If you still need help, please see :ref:`reporting-problems`
191197
192198
.. _LaTeX: http://www.tug.org

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy