Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62834a2

Browse files
authored
Merge pull request #31025 from story645/build-docs
DOC: move doc build options into tables and tabs
2 parents 5191512 + 74beb7f commit 62834a2

1 file changed

Lines changed: 55 additions & 28 deletions

File tree

doc/devel/document.rst

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,76 @@ used. To build the documentation in html format, cd into :file:`doc/` and run:
7070

7171
Build options
7272
-------------
73+
Other useful invocations include:
74+
75+
.. list-table::
76+
:widths: 30 30 40
77+
:header-rows: 1
78+
:stub-columns: 1
79+
80+
* - invocation
81+
- description
82+
- notes
83+
* - ``make html-noplot``
84+
- skip generation of the gallery images
85+
-
86+
* - ``make html-skip-subdirs``
87+
- skip specific subdirectories
88+
- If a gallery directory is skipped, the gallery images are not generated. The first
89+
time this is run, it creates ``.mpl_skip_subdirs.yaml`` which can be edited to add
90+
or remove subdirectories
91+
* - ``make clean``
92+
- Delete built files.
93+
- May help if you get errors about missing paths or broken links.
94+
* - ``make latexpdf``
95+
- Build pdf docs
96+
-
7397

74-
Other useful invocations include
98+
The ``SPHINXOPTS`` variable is set to ``-W --keep-going`` by default to build
99+
the complete docs but exit with exit status 1 if there are warnings. To unset it, set
100+
the variable to a blank space. On Windows, set the options as environment variables.
75101

76-
.. code-block:: sh
102+
.. tab-set::
103+
:sync-group: category
77104

78-
# Build the html documentation, but skip generation of the gallery images to
79-
# save time.
80-
make html-noplot
105+
.. tab-item:: Linux & macOS
106+
:sync: linux
81107

82-
# Build the html documentation, but skip specific subdirectories. If a gallery
83-
# directory is skipped, the gallery images are not generated. The first
84-
# time this is run, it creates ``.mpl_skip_subdirs.yaml`` which can be edited
85-
# to add or remove subdirectories
86-
make html-skip-subdirs
108+
.. code-block:: sh
87109
88-
# Delete built files. May help if you get errors about missing paths or
89-
# broken links.
90-
make clean
110+
make SPHINXOPTS= html
91111
92-
# Build pdf docs.
93-
make latexpdf
112+
.. tab-ITEM:: Windows
113+
:sync: windows
94114

95-
The ``SPHINXOPTS`` variable is set to ``-W --keep-going`` by default to build
96-
the complete docs but exit with exit status 1 if there are warnings. To unset
97-
it, use
98-
99-
.. code-block:: sh
115+
.. code-block:: bat
100116
101-
make SPHINXOPTS= html
117+
set SPHINXOPTS= & make html
102118
103119
You can use the ``O`` variable to set additional options:
104120

105-
* ``make O=-j4 html`` runs a parallel build with 4 processes.
106-
* ``make O=-Dplot_formats=png:100 html`` saves figures in low resolution.
121+
* ``O=-j4`` runs a parallel build with 4 processes.
122+
* ``O=-Dplot_formats=png:100`` saves figures in low resolution.
123+
124+
Multiple options can be combined, e.g:
125+
126+
.. tab-set::
127+
:sync-group: category
128+
129+
.. tab-item:: Linux & macOS
130+
:sync: linux
131+
132+
.. code-block:: sh
133+
134+
make SPHINXOPTS= O='-j4 -Dplot_formats=png:100' html
107135
108-
Multiple options can be combined, e.g. ``make O='-j4 -Dplot_formats=png:100'
109-
html``.
136+
.. tab-ITEM:: Windows
137+
:sync: windows
110138

111-
On Windows, set the options as environment variables, e.g.:
139+
.. code-block:: bat
112140
113-
.. code-block:: bat
141+
set SPHINXOPTS= & set O=-j4 -Dplot_formats=png:100 & make html
114142
115-
set SPHINXOPTS= & set O=-j4 -Dplot_formats=png:100 & make html
116143
117144
Show locally built docs
118145
-----------------------

0 commit comments

Comments
 (0)