From 5ed2a3a9f594926beef012fa87f061ffb9c58982 Mon Sep 17 00:00:00 2001 From: Gabe Date: Sat, 8 Jul 2017 21:40:09 -0600 Subject: [PATCH 1/4] Add a sentence mentioning that mathtext is not controlled with font rc params --- tutorials/text/mathtext.py | 2 ++ tutorials/text/text_props.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tutorials/text/mathtext.py b/tutorials/text/mathtext.py index ab4f93de75f4..d09734d3e6bd 100644 --- a/tutorials/text/mathtext.py +++ b/tutorials/text/mathtext.py @@ -151,6 +151,8 @@ # # \sqrt[3]{x} # +# .. _mathtext_fonts: +# # Fonts # ----- # diff --git a/tutorials/text/text_props.py b/tutorials/text/text_props.py index 9afca3fa7777..e6c20edc317c 100644 --- a/tutorials/text/text_props.py +++ b/tutorials/text/text_props.py @@ -143,7 +143,9 @@ # Default Font # ============== # -# The base default font is controlled by a set of rcParams: +# The base default font is controlled by a set of rcParams. To set the font +# for mathematical expressions, use the rcParams begining with ``mathtext`` +# (see :ref:`mathtext `). # # +---------------------+----------------------------------------------------+ # | rcParam | usage | @@ -212,7 +214,7 @@ # # or set it in your :file:`.matplotlibrc` file:: # -# font.sans-serif: Source Han Sans TW, Ariel, sans-serif +# font.sans-serif: Source Han Sans TW, Arial, sans-serif # # To control the font used on per-artist basis use the ``'name'``, # ``'fontname'`` or ``'fontproperties'`` kwargs documented :ref:`above From 3c3b3ad5788b8e9218451842246f16cc79f1c12a Mon Sep 17 00:00:00 2001 From: Gabe Date: Sun, 9 Jul 2017 17:50:58 -0600 Subject: [PATCH 2/4] fix issue with mathtext label not working. The things that fixed it was adding the line of ### and then adding a # on one of the lines that was missing it --- doc/devel/MEP/MEP12.rst | 1 + tutorials/text/mathtext.py | 5 +++-- tutorials/text/text_props.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/devel/MEP/MEP12.rst b/doc/devel/MEP/MEP12.rst index 5f0356f98672..ca978ea38110 100644 --- a/doc/devel/MEP/MEP12.rst +++ b/doc/devel/MEP/MEP12.rst @@ -190,6 +190,7 @@ Tagging examples will also help users search the example gallery. Although tags would be a big win for users with specific goals, the plot gallery will remain the entry point to these examples, and sections could really help users navigate the gallery. Thus, tags are complementary to this reorganization. +[2]_ [3]_ [4]_ [5]_ .. _PEP8: https://www.python.org/dev/peps/pep-0008/ diff --git a/tutorials/text/mathtext.py b/tutorials/text/mathtext.py index d09734d3e6bd..85128e7efbaf 100644 --- a/tutorials/text/mathtext.py +++ b/tutorials/text/mathtext.py @@ -15,6 +15,7 @@ to generate their text (see :ref:`sphx_glr_tutorials_text_usetex.py`). """ +############################################################################### # Any text element can use math text. You should use raw strings (precede the # quotes with an ``'r'``), and surround the math text with dollar signs ($), as in # TeX. Regular text and mathtext can be interleaved within the same string. @@ -32,7 +33,7 @@ # `_. # # Here is a simple example:: - +# # # plain text # plt.title('alpha > beta') # @@ -151,7 +152,7 @@ # # \sqrt[3]{x} # -# .. _mathtext_fonts: +# .. _mathtext-fonts: # # Fonts # ----- diff --git a/tutorials/text/text_props.py b/tutorials/text/text_props.py index e6c20edc317c..ccfb61e106c8 100644 --- a/tutorials/text/text_props.py +++ b/tutorials/text/text_props.py @@ -145,7 +145,7 @@ # # The base default font is controlled by a set of rcParams. To set the font # for mathematical expressions, use the rcParams begining with ``mathtext`` -# (see :ref:`mathtext `). +# (see :ref:`mathtext `). # # +---------------------+----------------------------------------------------+ # | rcParam | usage | From 9ff975a83f3a69de32bef1b373cd4c6b3d70a227 Mon Sep 17 00:00:00 2001 From: Gabe Date: Mon, 10 Jul 2017 20:53:08 -0600 Subject: [PATCH 3/4] remove some junk i added --- doc/devel/MEP/MEP12.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/devel/MEP/MEP12.rst b/doc/devel/MEP/MEP12.rst index ca978ea38110..5f0356f98672 100644 --- a/doc/devel/MEP/MEP12.rst +++ b/doc/devel/MEP/MEP12.rst @@ -190,7 +190,6 @@ Tagging examples will also help users search the example gallery. Although tags would be a big win for users with specific goals, the plot gallery will remain the entry point to these examples, and sections could really help users navigate the gallery. Thus, tags are complementary to this reorganization. -[2]_ [3]_ [4]_ [5]_ .. _PEP8: https://www.python.org/dev/peps/pep-0008/ From cc8b85ed76152ad3de13aa54c82e7561ab4d2e7b Mon Sep 17 00:00:00 2001 From: Gabe Date: Mon, 10 Jul 2017 21:26:40 -0600 Subject: [PATCH 4/4] beginning --- tutorials/text/text_props.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/text/text_props.py b/tutorials/text/text_props.py index ccfb61e106c8..d0cf823d94f1 100644 --- a/tutorials/text/text_props.py +++ b/tutorials/text/text_props.py @@ -144,7 +144,7 @@ # ============== # # The base default font is controlled by a set of rcParams. To set the font -# for mathematical expressions, use the rcParams begining with ``mathtext`` +# for mathematical expressions, use the rcParams beginning with ``mathtext`` # (see :ref:`mathtext `). # # +---------------------+----------------------------------------------------+