Skip to content

Commit

Permalink
Minor cleanup to autosectionlabel docs (#12992)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
  • Loading branch information
timhoffm and AA-Turner authored Oct 10, 2024
1 parent 566d1cd commit 283d863
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions doc/usage/extensions/autosectionlabel.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.. highlight:: rst

:mod:`sphinx.ext.autosectionlabel` -- Allow reference sections using its title
==============================================================================
:mod:`sphinx.ext.autosectionlabel` -- Allow referencing sections by their title
===============================================================================

.. module:: sphinx.ext.autosectionlabel
:synopsis: Allow reference section its title.
:synopsis: Allow referencing sections by their title.

.. versionadded:: 1.4

This extension allows you to refer sections its title. This affects to the
reference role (:rst:role:`ref`).
By default, cross-references to sections use labels (see :rst:role:`ref`).
This extension allows you to instead refer to sections by their title.

For example::

Expand All @@ -32,6 +32,8 @@ Configuration
-------------

.. confval:: autosectionlabel_prefix_document
:type: :code-py:`bool`
:default: :code-py:`False`

True to prefix each section label with the name of the document it is in,
followed by a colon. For example, ``index:Introduction`` for a section
Expand All @@ -40,11 +42,13 @@ Configuration
documents.

.. confval:: autosectionlabel_maxdepth
:type: :code-py:`int | None`
:default: :code-py:`None`

If set, autosectionlabel chooses the sections for labeling by its depth. For
example, when set 1 to ``autosectionlabel_maxdepth``, labels are generated
only for top level sections, and deeper sections are not labeled. It
defaults to ``None`` (disabled).
defaults to ``None`` (i.e. all sections are labeled).


Debugging
Expand Down

0 comments on commit 283d863

Please sign in to comment.