Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f87c686

Browse filesBrowse files
authored
Merge pull request #11295 from timhoffm/only-directive
Use sphinx builtin only directive instead of custom one.
2 parents 6eae56b + 10cb6fb commit f87c686
Copy full SHA for f87c686

File tree

13 files changed

+15
-86
lines changed
Filter options

13 files changed

+15
-86
lines changed

‎doc/api/index.rst

Copy file name to clipboardExpand all lines: doc/api/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The Matplotlib API
55
####################
66

7-
.. htmlonly::
7+
.. only:: html
88

99
:Release: |version|
1010
:Date: |today|

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
'numpydoc', # Needs to be loaded *after* autodoc.
3939
'sphinx_gallery.gen_gallery',
4040
'matplotlib.sphinxext.mathmpl',
41-
'matplotlib.sphinxext.only_directives',
4241
'matplotlib.sphinxext.plot_directive',
4342
'sphinxext.custom_roles',
4443
'sphinxext.github',

‎doc/contents.rst

Copy file name to clipboardExpand all lines: doc/contents.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Overview
44
========
55

6-
.. htmlonly::
6+
.. only:: html
77

88
:Release: |version|
99
:Date: |today|
@@ -23,7 +23,7 @@ Overview
2323
devel/index.rst
2424
glossary/index.rst
2525

26-
.. htmlonly::
26+
.. only:: html
2727

2828
* :ref:`genindex`
2929
* :ref:`modindex`

‎doc/devel/MEP/index.rst

Copy file name to clipboardExpand all lines: doc/devel/MEP/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.. include:: README.rst
44

5-
.. htmlonly::
5+
.. only:: html
66

77
:Release: |version|
88
:Date: |today|

‎doc/devel/index.rst

Copy file name to clipboardExpand all lines: doc/devel/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The Matplotlib Developers' Guide
55
################################
66

7-
.. htmlonly::
7+
.. only:: html
88

99
:Release: |version|
1010
:Date: |today|

‎doc/faq/howto_faq.rst

Copy file name to clipboardExpand all lines: doc/faq/howto_faq.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ and patches, respectively::
350350

351351
line, = ax.plot(x, y, zorder=10)
352352

353-
.. htmlonly::
353+
.. only:: html
354354

355355
See :ref:`sphx_glr_gallery_misc_zorder_demo.py` for a complete example.
356356

@@ -369,7 +369,7 @@ some ratio which controls the ratio::
369369

370370
ax = fig.add_subplot(111, aspect='equal')
371371

372-
.. htmlonly::
372+
.. only:: html
373373

374374
See :ref:`sphx_glr_gallery_subplots_axes_and_figures_axis_equal_demo.py` for a
375375
complete example.
@@ -413,7 +413,7 @@ locators as desired because the two axes are independent.
413413
plt.show()
414414

415415

416-
.. htmlonly::
416+
.. only:: html
417417

418418
See :ref:`sphx_glr_gallery_api_two_scales.py` for a complete example
419419

‎doc/faq/index.rst

Copy file name to clipboardExpand all lines: doc/faq/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The Matplotlib FAQ
55
##################
66

7-
.. htmlonly::
7+
.. only:: html
88

99
:Release: |version|
1010
:Date: |today|

‎doc/users/index.rst

Copy file name to clipboardExpand all lines: doc/users/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
User's Guide
55
############
66

7-
.. htmlonly::
7+
.. only:: html
88

99
:Release: |version|
1010
:Date: |today|

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ def thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear',
14741474
14751475
See examples/misc/image_thumbnail.py.
14761476
1477-
.. htmlonly::
1477+
.. only:: html
14781478
14791479
:ref:`sphx_glr_gallery_misc_image_thumbnail_sgskip.py`
14801480

‎lib/matplotlib/sphinxext/only_directives.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/only_directives.py
-70Lines changed: 0 additions & 70 deletions
This file was deleted.

‎lib/matplotlib/sphinxext/plot_directive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/plot_directive.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def remove_coding(text):
412412
"""
413413

414414
exception_template = """
415-
.. htmlonly::
415+
.. only:: html
416416
417417
[`source code <%(linkdir)s/%(basename)s.py>`__]
418418

‎tutorials/text/mathtext.py

Copy file name to clipboardExpand all lines: tutorials/text/mathtext.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
# ``\mathrm{\mathsf{sansserif}}`` :math-stix:`\mathrm{\mathsf{sansserif}}`
222222
# ====================================== =========================================
223223
#
224-
# .. htmlonly::
224+
# .. only:: html
225225
#
226226
# ====================================== =========================================
227227
# ``\mathcircled{circled}`` :math-stix:`\mathcircled{circled}`

‎tutorials/text/pgf.py

Copy file name to clipboardExpand all lines: tutorials/text/pgf.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@
110110
if you want to do the font configuration yourself instead of using the fonts
111111
specified in the rc parameters, make sure to disable ``pgf.rcfonts``.
112112
113-
.. htmlonly::
113+
.. only:: html
114114
115115
.. literalinclude:: ../../gallery/userdemo/pgf_preamble_sgskip.py
116116
:end-before: plt.savefig
117117
118-
.. latexonly::
118+
.. only:: latex
119119
120120
.. literalinclude:: ../../gallery/userdemo/pgf_preamble_sgskip.py
121121
:end-before: import matplotlib.pyplot as plt

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.