mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #1286, #2099: Add `sphinx.ext.autosectionlabel` extension to allow reference sections using its title
This commit is contained in:
25
doc/ext/autosectionlabel.rst
Normal file
25
doc/ext/autosectionlabel.rst
Normal file
@@ -0,0 +1,25 @@
|
||||
.. highlight:: rest
|
||||
|
||||
:mod:`sphinx.ext.autosectionlabel` -- Allow reference sections using its title
|
||||
==============================================================================
|
||||
|
||||
.. module:: sphinx.ext.autosectionlabel
|
||||
:synopsis: Allow reference section its title.
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
This extension allows you to refer sections its title. This affects to the
|
||||
reference role (:rst:role:`ref`).
|
||||
|
||||
For example::
|
||||
|
||||
A Plain Title
|
||||
-------------
|
||||
|
||||
This is the text of the section.
|
||||
|
||||
It refers to the section title, see :ref:`A Plain Title`.
|
||||
|
||||
|
||||
Internally, this extension generates the labels for each section. If same
|
||||
section names are used in whole of document, any one is used for a target.
|
||||
Reference in New Issue
Block a user