From a104a01411269ef914e7f079c5d441715212e537 Mon Sep 17 00:00:00 2001 From: Vishnu V K Date: Wed, 21 Jul 2021 22:23:26 +0530 Subject: [PATCH 1/6] Indicate a possible 'lmodern' requirement --- lib/matplotlib/backends/backend_pgf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py index 3f1cb7b172eb..7190aba86de2 100644 --- a/lib/matplotlib/backends/backend_pgf.py +++ b/lib/matplotlib/backends/backend_pgf.py @@ -777,6 +777,10 @@ def _print_pgf_to_fh(self, fh, *, bbox_inches_restore=None): %% Make sure the required packages are loaded in your preamble %% \\usepackage{pgf} %% +%% Also ensure that all the required font packages are loaded; for instance, +%% the lmodern package is often necessary when using math font. +%% \\usepackage{lmodern} +%% %% Figures using additional raster images can only be included by \\input if %% they are in the same directory as the main LaTeX file. For loading figures %% from other directories you can use the `import` package From a8041fa29fe17257181c733bd551289cac14757f Mon Sep 17 00:00:00 2001 From: Vishnu V K Date: Wed, 21 Jul 2021 22:29:17 +0530 Subject: [PATCH 2/6] Describe the font issue --- tutorials/text/pgf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tutorials/text/pgf.py b/tutorials/text/pgf.py index 6f958efe03fc..30410d35fe52 100644 --- a/tutorials/text/pgf.py +++ b/tutorials/text/pgf.py @@ -187,6 +187,11 @@ using either the ``rasterized=True`` keyword, or ``.set_rasterized(True)`` as per :doc:`this example `. +* Various math font are compiled and rendered only if corresponding font + packages are loaded. The ``lmodern`` package is often required when using + math symbols. See `discussion ` + for more details. + * If you still need help, please see :ref:`reporting-problems` .. _LaTeX: http://www.tug.org From 77fb127776c6b40e121b7adb3153557d4d8c920b Mon Sep 17 00:00:00 2001 From: Vishnu V K Date: Thu, 22 Jul 2021 15:41:24 +0530 Subject: [PATCH 3/6] Specify that the issue is with bold-face Greek letters --- tutorials/text/pgf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/text/pgf.py b/tutorials/text/pgf.py index 30410d35fe52..cc7584ffba61 100644 --- a/tutorials/text/pgf.py +++ b/tutorials/text/pgf.py @@ -188,9 +188,9 @@ per :doc:`this example `. * Various math font are compiled and rendered only if corresponding font - packages are loaded. The ``lmodern`` package is often required when using - math symbols. See `discussion ` - for more details. + packages are loaded. Specifically, when using ``\mathbf{}`` on Greek letters, + the default computer modern font may not contain them, in which case such font + is not rendered. Is such scenarios, the ``lmodern`` package may be loaded. * If you still need help, please see :ref:`reporting-problems` From 92f01875371bc4cad000eefb255a9e7abb159303 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 13 Oct 2021 15:52:23 -0400 Subject: [PATCH 4/6] DOC/STY: remove white space and hedge language --- lib/matplotlib/backends/backend_pgf.py | 4 ++-- tutorials/text/pgf.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py index 7190aba86de2..ce9797e11b90 100644 --- a/lib/matplotlib/backends/backend_pgf.py +++ b/lib/matplotlib/backends/backend_pgf.py @@ -777,8 +777,8 @@ def _print_pgf_to_fh(self, fh, *, bbox_inches_restore=None): %% Make sure the required packages are loaded in your preamble %% \\usepackage{pgf} %% -%% Also ensure that all the required font packages are loaded; for instance, -%% the lmodern package is often necessary when using math font. +%% Also ensure that all the required font packages are loaded; for instance, +%% the lmodern package is sometimes necessary when using math font. %% \\usepackage{lmodern} %% %% Figures using additional raster images can only be included by \\input if diff --git a/tutorials/text/pgf.py b/tutorials/text/pgf.py index cc7584ffba61..929723e8571e 100644 --- a/tutorials/text/pgf.py +++ b/tutorials/text/pgf.py @@ -189,8 +189,9 @@ * Various math font are compiled and rendered only if corresponding font packages are loaded. Specifically, when using ``\mathbf{}`` on Greek letters, - the default computer modern font may not contain them, in which case such font - is not rendered. Is such scenarios, the ``lmodern`` package may be loaded. + the default computer modern font may not contain them, in which case such + font is not rendered. Is such scenarios, the ``lmodern`` package should be + loaded. * If you still need help, please see :ref:`reporting-problems` From 3712476fcd691af6fbadb3e33fe9dc222e712e38 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 13 Oct 2021 15:58:51 -0400 Subject: [PATCH 5/6] DOC: fix typo Co-authored-by: Elliott Sales de Andrade --- tutorials/text/pgf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/text/pgf.py b/tutorials/text/pgf.py index 929723e8571e..8641936a160b 100644 --- a/tutorials/text/pgf.py +++ b/tutorials/text/pgf.py @@ -190,7 +190,7 @@ * Various math font are compiled and rendered only if corresponding font packages are loaded. Specifically, when using ``\mathbf{}`` on Greek letters, the default computer modern font may not contain them, in which case such - font is not rendered. Is such scenarios, the ``lmodern`` package should be + font is not rendered. In such scenarios, the ``lmodern`` package should be loaded. * If you still need help, please see :ref:`reporting-problems` From eccdda19939d9058318cd4adeaeaba3aa8b46c32 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 15 Oct 2021 19:36:05 -0400 Subject: [PATCH 6/6] DOC: edits from review Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- tutorials/text/pgf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/text/pgf.py b/tutorials/text/pgf.py index 8641936a160b..caedf394f359 100644 --- a/tutorials/text/pgf.py +++ b/tutorials/text/pgf.py @@ -187,10 +187,10 @@ using either the ``rasterized=True`` keyword, or ``.set_rasterized(True)`` as per :doc:`this example `. -* Various math font are compiled and rendered only if corresponding font +* Various math fonts are compiled and rendered only if corresponding font packages are loaded. Specifically, when using ``\mathbf{}`` on Greek letters, - the default computer modern font may not contain them, in which case such - font is not rendered. In such scenarios, the ``lmodern`` package should be + the default computer modern font may not contain them, in which case the + letter is not rendered. In such scenarios, the ``lmodern`` package should be loaded. * If you still need help, please see :ref:`reporting-problems`