8000 Merge pull request #21453 from timhoffm/doc-sections · matplotlib/matplotlib@7747ab9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7747ab9

Browse files
authored
Merge pull request #21453 from timhoffm/doc-sections
Cleanup index.rst sectioning
2 parents 4c71a1f + f4688ae commit 7747ab9

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

doc/devel/documenting_mpl.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,28 @@ Formatting and style conventions
138138
It is useful to strive for consistency in the Matplotlib documentation. Here
139139
are some formatting and style conventions that are used.
140140

141-
Section name formatting
142-
~~~~~~~~~~~~~~~~~~~~~~~
141+
Section formatting
142+
~~~~~~~~~~~~~~~~~~
143143

144144
For everything but top-level chapters, use ``Upper lower`` for
145145
section titles, e.g., ``Possible hangups`` rather than ``Possible
146146
Hangups``
147147

148+
We aim to follow the recommendations from the
149+
`Python documentation <https://devguide.python.org/documenting/#sections>`_
150+
and the `Sphinx reStructuredText documentation <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections>`_
151+
for section markup characters, i.e.:
152+
153+
- ``#`` with overline, for parts. This is reserved for the main title in
154+
``index.rst``. All other pages should start with "chapter" or lower.
155+
- ``*`` with overline, for chapters
156+
- ``=``, for sections
157+
- ``-``, for subsections
158+
- ``^``, for subsubsections
159+
- ``"``, for paragraphs
160+
161+
This may not yet be applied consistently in existing docs.
162+
148163
Function arguments
149164
~~~~~~~~~~~~~~~~~~
150165

doc/index.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
.. module:: matplotlib
66

77

8+
##################################
89
Matplotlib |release| documentation
9-
----------------------------------
10+
##################################
1011

1112
Matplotlib is a comprehensive library for creating static, animated,
1213
and interactive visualizations in Python.
1314

15+
************
1416
Installation
15-
============
17+
************
1618

1719
.. container:: twocol
1820

@@ -35,9 +37,9 @@ Installation
3537
Further details are available in the :doc:`Installation Guide <users/installing/index>`.
3638

3739

40+
******************
3841
Learning resources
39-
==================
40-
42+
******************
4143

4244
.. panels::
4345

@@ -81,26 +83,22 @@ Learning resources
8183

8284

8385

86+
********************
8487
Third-party packages
85-
--------------------
88+
********************
8689

8790
There are many `Third-party packages
8891
<https://matplotlib.org/mpl-third-party/>`_ built on top of and extending
8992
Matplotlib.
9093

9194

95+
************
9296
Contributing
93-
------------
97+
************
9498

9599
Matplotlib is a community project maintained for and by its users. There are many ways
96100
you can help!
97101

98102
- Help other users `on discourse <https://discourse.matplotlib.org>`__
99103
- report a bug or request a feature `on GitHub <https://github.com/matplotlib/matplotlib/issues>`__
100104
- or improve the :ref:`documentation and code <developers-guide-index>`
101-
102-
103-
Users guide
104-
-----------
105-
106-
The `contents of the docs <users/index.html>`_.

0 commit comments

Comments
 (0)
0