mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #3118: Update document for numfig_format and numref
This commit is contained in:
+1
-5
@@ -297,8 +297,7 @@ General configuration
|
|||||||
|
|
||||||
A dictionary mapping ``'figure'``, ``'table'``, ``'code-block'`` and
|
A dictionary mapping ``'figure'``, ``'table'``, ``'code-block'`` and
|
||||||
``'section'`` to strings that are used for format of figure numbers.
|
``'section'`` to strings that are used for format of figure numbers.
|
||||||
As a special character, `%s` and `{number}` will be replaced to figure
|
As a special character, `%s` will be replaced to figure number.
|
||||||
number. `{name}` will be replaced to figure caption.
|
|
||||||
|
|
||||||
Default is to use ``'Fig. %s'`` for ``'figure'``, ``'Table %s'`` for
|
Default is to use ``'Fig. %s'`` for ``'figure'``, ``'Table %s'`` for
|
||||||
``'table'``, ``'Listing %s'`` for ``'code-block'`` and ``'Section'`` for
|
``'table'``, ``'Listing %s'`` for ``'code-block'`` and ``'Section'`` for
|
||||||
@@ -306,9 +305,6 @@ General configuration
|
|||||||
|
|
||||||
.. versionadded:: 1.3
|
.. versionadded:: 1.3
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
|
||||||
Support format of section. Allow to refer the caption of figures.
|
|
||||||
|
|
||||||
.. confval:: numfig_secnum_depth
|
.. confval:: numfig_secnum_depth
|
||||||
|
|
||||||
The scope of figure numbers, that is, the numfig feature numbers figures
|
The scope of figure numbers, that is, the numfig feature numbers figures
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ Cross-referencing figures by figure number
|
|||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
`numref` role can also refer sections.
|
`numref` role can also refer sections.
|
||||||
|
And `numref` allows `{name}` for the link text.
|
||||||
|
|
||||||
.. rst:role:: numref
|
.. rst:role:: numref
|
||||||
|
|
||||||
@@ -223,7 +224,10 @@ Cross-referencing figures by figure number
|
|||||||
|
|
||||||
If an explicit link text is given (like usual: ``:numref:`Image of Sphinx (Fig.
|
If an explicit link text is given (like usual: ``:numref:`Image of Sphinx (Fig.
|
||||||
%s) <my-figure>```), the link caption will be the title of the reference.
|
%s) <my-figure>```), the link caption will be the title of the reference.
|
||||||
The format of link text is same as :confval:`numfig_format`.
|
As a special character, `%s` and `{number}` will be replaced to figure
|
||||||
|
number. `{name}` will be replaced to figure caption.
|
||||||
|
If no explicit link text is given, the value of :confval:`numfig_format` is
|
||||||
|
used to default value of link text.
|
||||||
|
|
||||||
If :confval:`numfig` is ``False``, figures are not numbered.
|
If :confval:`numfig` is ``False``, figures are not numbered.
|
||||||
so this role inserts not a reference but labels or link text.
|
so this role inserts not a reference but labels or link text.
|
||||||
|
|||||||
Reference in New Issue
Block a user