1
1
.. highlight :: rst
2
2
3
- :mod: `sphinx.ext.autosectionlabel ` -- Allow reference sections using its title
4
- ==============================================================================
3
+ :mod: `sphinx.ext.autosectionlabel ` -- Allow referencing sections by their title
4
+ ===============================================================================
5
5
6
6
.. module :: sphinx.ext.autosectionlabel
7
- :synopsis: Allow reference section its title.
7
+ :synopsis: Allow referencing sections by their title.
8
8
9
9
.. versionadded :: 1.4
10
10
11
- This extension allows you to refer sections its title. This affects to the
12
- reference role ( :rst:role: ` ref `) .
11
+ By default, cross-references to sections use labels (see :rst:role: ` ref `).
12
+ This extension allows you to instead refer to sections by their title .
13
13
14
14
For example::
15
15
@@ -32,6 +32,8 @@ Configuration
32
32
-------------
33
33
34
34
.. confval :: autosectionlabel_prefix_document
35
+ :type: :code-py: `bool `
36
+ :default: :code-py: `False `
35
37
36
38
True to prefix each section label with the name of the document it is in,
37
39
followed by a colon. For example, ``index:Introduction `` for a section
@@ -40,11 +42,13 @@ Configuration
40
42
documents.
41
43
42
44
.. confval :: autosectionlabel_maxdepth
45
+ :type: :code-py: `int | None `
46
+ :default: :code-py: `None `
43
47
44
48
If set, autosectionlabel chooses the sections for labeling by its depth. For
45
49
example, when set 1 to ``autosectionlabel_maxdepth ``, labels are generated
46
50
only for top level sections, and deeper sections are not labeled. It
47
- defaults to ``None `` (disabled ).
51
+ defaults to ``None `` (i.e. all sections are labeled ).
48
52
49
53
50
54
Debugging
0 commit comments