@@ -47,7 +47,7 @@ requirements that are needed to build the documentation. They are listed in
47
47
* IPython
48
48
* numpydoc>=0.4
49
49
* Pillow
50
- * sphinx-gallery>=0.1.13
50
+ * sphinx-gallery>=0.2.0
51
51
* graphviz
52
52
53
53
.. note ::
@@ -72,13 +72,18 @@ Other useful invocations include
72
72
73
73
.. code-block :: sh
74
74
75
- # Delete built files. May help if you get errors about missing paths or
76
- # broken links.
75
+ # Delete built files. May help if you get errors about
76
+ # missing paths or broken links.
77
77
make clean
78
78
79
79
# Build pdf docs.
80
80
make latexpdf
81
81
82
+ Linux, macOS
83
+ ~~~~~~~~~~~~
84
+ The documentation is built using the ``Makefile `` file and parameters
85
+ can be set either in the ``Makefile `` or on the command line.
86
+
82
87
The ``SPHINXOPTS `` variable is set to ``-W `` by default to turn warnings into
83
88
errors. To unset it, use
84
89
@@ -88,16 +93,89 @@ errors. To unset it, use
88
93
89
94
You can use the ``O `` variable to set additional options:
90
95
91
- * ``make O=-j4 html `` runs a parallel build with 4 processes.
92
- * ``make O=-Dplot_formats=png:100 html `` saves figures in low resolution.
93
- * ``make O=-Dplot_gallery=0 html `` skips the gallery build.
96
+ .. code-block :: sh
97
+
98
+ # runs a parallel build with 4 processes.
99
+ make O=-j4 html
100
+
101
+ # saves figures in low resolution.
102
+ make O=-Dplot_formats=png:100 html
103
+
104
+ # builds the gallery without executing the scripts
105
+ make O=-Dplot_gallery=0 html
106
+
107
+ # Multiple options can be combined using e.g.
108
+ make O=' -j4 -Dplot_gallery=0' html
109
+
110
+ Windows
111
+ ~~~~~~~
112
+
113
+ The documentation is build using the ``make.bat `` file. The options are set using
114
+ environment variables and variables can be set either in the
115
+ ``make.bat `` file or set on the command line befor running ``make.bat ``.
116
+
117
+ Environment variables are set with
118
+
119
+ .. code-block :: sh
120
+
121
+ # in cmd
122
+ set SPHINXOPTS=-W
123
+ set O=-Dplot_gallery=0
94
124
95
- Multiple options can be combined using e.g. ``make O='-j4 -Dplot_gallery=0'
96
- html ``.
125
+ # in powershell
126
+ Set-Item env:SPHINXOPTS " -W"
127
+ Set-Item env:O " -Dplot_gallery=0"
128
+
129
+ The ``SPHINXOPTS `` variable is set to ``-W `` by default to turn warnings into
130
+ errors. To unset it, set the ``SPHINXOPTS `` variable to any argument except
131
+ nothing. A space can used to overide the default.
132
+
133
+ .. code-block :: sh
134
+
135
+ # in cmd
136
+ # use the default -W option
137
+ make html
138
+ set SPHINXOPTS=& make html
139
+
140
+ # to not use the default
141
+ set SPHINXOPTS= & make html
142
+
143
+ You can use the ``O `` variable to set additional options, for example (see
144
+ linux, macOS above for more options)
97
145
98
- On Windows, options needs to be set as environment variables, e.g. ``set O=-W
99
- -j4 & make html ``.
146
+ .. code-block :: sh
147
+
148
+ set O=-j4 -Dplot_gallery=0
149
+
150
+ The total command is then run with
151
+
152
+ .. code-block :: sh
153
+
154
+ # in cmd
155
+ set O=-Dplot_gallery=0
156
+ make html
157
+
158
+ # or on one line
159
+ set O=-Dplot_gallery=0 & make html
160
+
161
+ # in powershell
162
+ Set-Item env:O " -Dplot_gallery=0"
163
+ .\m ake html
164
+
165
+ # or on one line
166
+ Set-Item env:O " -Dplot_gallery=0" ; .\m ake html
167
+
168
+ Both ``SPHINXOPTS `` and ``O `` are unset at the end of the ``make.bat `` file
169
+ if cmd is used but not if powershell is used. So a variable must be unset
170
+ manually with
171
+
172
+ .. code-block :: sh
100
173
174
+ Set-Item evn:O
175
+
176
+ in powershell before running ``make.bat `` again if the default behavior is
177
+ wanted.
178
+
101
179
.. _writing-rest-pages :
102
180
103
181
Writing ReST pages
0 commit comments