Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup to autosectionlabel docs #12992

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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