2
2
Configuration
3
3
=============
4
4
5
+ List of config options
6
+ ======================
7
+
5
8
Most sphinx-gallery configuration options are set in the Sphinx ``conf.py ``
6
9
file:
7
10
8
- - `examples_dirs and gallery_dirs <multiple_galleries_config >`_
9
- - `filename_pattern <build_pattern >`_
10
- - `subsection_order <sub_gallery_order >`_
11
- - `reference_url ` <link_to_documentation>`_
12
- - `backreferences_dir and doc_module <references_to_examples > `_
13
- - `default_thumb_file <custom_default_thumb >`_
14
- - `line_numbers <adding_line_numbers >`_
15
- - `disable_joint_download <download_section_examples >`_
11
+ - :ref: `examples_dirs and gallery_dirs <multiple_galleries_config >`
12
+ - :ref: `filename_pattern <build_pattern >`
13
+ - :ref: `subsection_order <sub_gallery_order >`
14
+ - :ref: `reference_url <link_to_documentation >`
15
+ - :ref: `backreferences_dir and doc_module <references_to_examples >`
16
+ - :ref: `default_thumb_file <custom_default_thumb >`
17
+ - :ref: `line_numbers <adding_line_numbers >`
18
+ - :ref: `disable_joint_download <download_section_examples >`
16
19
17
20
Some options can also be set or overridden on a file-by-file basis:
18
21
19
- - adding_line_numbers _
20
- - without_execution _
21
- - choosing_thumbnail _
22
+ - :ref: ` adding_line_numbers `
23
+ - :ref: ` without_execution `
24
+ - :ref: ` choosing_thumbnail `
22
25
23
26
And some options can be set during the build execution step:
24
27
25
- - without_execution _
26
- - dealing_with_failures _
28
+ - :ref: ` without_execution `
29
+ - :ref: ` dealing_with_failures `
27
30
28
31
.. _multiple_galleries_config :
29
32
@@ -51,9 +54,7 @@ Building examples matching a pattern
51
54
52
55
By default, Sphinx-Gallery execute only examples beginning with ``plot ``. However,
53
56
if this naming convention does not suit your project, you can modify this pattern
54
- in your Sphinx ``conf.py ``. For example:
55
-
56
- .. code-block :: python
57
+ in your Sphinx ``conf.py ``. For example::
57
58
58
59
sphinx_gallery_conf = {
59
60
'filename_pattern': '/plot_compute_',
@@ -94,8 +95,7 @@ As the patterns are parsed as `regular expressions`_, users are advised to consu
94
95
95
96
.. _sub_gallery_order :
96
97
97
- Sorting the subsections inside a gallery
98
- ========================================
98
+ Sorting gallery subsections
99
99
100
100
Gallery subsections are sorted by default alphabetically by their folder
101
101
name, and as such you can always organize them by changing your folder
@@ -161,8 +161,8 @@ dictionary within your Sphinx ``conf.py`` file::
161
161
162
162
.. _references_to_examples :
163
163
164
- References to examples (backreferences)
165
- =======================================
164
+ Adding references to examples
165
+ =============================
166
166
167
167
Sphinx-Gallery enables you, when documenting your modules, to
168
168
reference to the examples that use a particular function. For example
@@ -270,8 +270,8 @@ configuration option setup for Sphinx-Gallery.
270
270
271
271
.. _custom_default_thumb :
272
272
273
- Using a custom default thumbnail image
274
- ======================================
273
+ Using a custom default thumbnail
274
+ ================================
275
275
276
276
In case you want to use your own image for the thumbnail of examples that do
277
277
not generate any plot, you can specify it by editing your Sphinx ``conf.py ``
@@ -285,8 +285,8 @@ file. You need to add to the configuration dictionary a key called
285
285
286
286
.. _adding_line_numbers :
287
287
288
- Adding line numbers to example listings
289
- =======================================
288
+ Adding line numbers to examples
289
+ ===============================
290
290
291
291
Line numbers can be displayed in listings by adding the global ``line_numbers ``
292
292
setting::
@@ -306,8 +306,8 @@ original file.
306
306
307
307
.. _disable_joint_download :
308
308
309
- Disable joint download of all gallery scripts
310
- =============================================
309
+ Disabling joint download of scripts
310
+ ===================================
311
311
312
312
By default Sphinx-Gallery prepares zip files of all python scripts and
313
313
all Jupyter notebooks for each gallery section and makes them
@@ -321,8 +321,8 @@ behavior add to the configuration dictionary in your ``conf.py`` file::
321
321
322
322
.. _choosing_thumbnail :
323
323
324
- Choosing the thumbnail image from multiple figures
325
- ==================================================
324
+ Choosing the thumbnail image
325
+ ============================
326
326
327
327
For examples that generate multiple figures, the default behavior will use
328
328
the first figure created in each as the thumbnail image displayed in the
@@ -340,8 +340,8 @@ of this functionality.
340
340
341
341
.. _without_execution :
342
342
343
- Building the Gallery without executing the examples
344
- ===================================================
343
+ Building without executing examples
344
+ ===================================
345
345
346
346
Sphinx-Gallery can parse all your examples and build the gallery
347
347
without executing any of the scripts. This is just for speed
@@ -417,10 +417,7 @@ It might be the case that you want to keep the gallery even with
417
417
failed examples. Thus you can configure Sphinx-Gallery to allow
418
418
certain examples to fail and still exit with a 0 exit code. For this
419
419
you need to list all the examples you want to allow to fail during
420
- build. Change your `conf.py ` accordingly:
421
-
422
-
423
- .. code-block :: python
420
+ build. Change your `conf.py ` accordingly::
424
421
425
422
sphinx_gallery_conf = {
426
423
...
0 commit comments