diff options
Diffstat (limited to 'doc/markup/inline.rst')
-rw-r--r-- | doc/markup/inline.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst index ae47f820d..bd02dfa08 100644 --- a/doc/markup/inline.rst +++ b/doc/markup/inline.rst @@ -212,15 +212,18 @@ Cross-referencing figures by figure number .. versionadded:: 1.3 +.. versionchanged:: 1.5 + `numref` role can also refer sections. + .. rst:role:: numref - Link to the specified figures, tables and code-blocks; the standard reST - labels are used. When you use this role, it will insert a reference to the - figure with link text by its figure number like "Fig. 1.1". + Link to the specified figures, tables, code-blocks and sections; the standard + reST labels are used. When you use this role, it will insert a reference to + the figure with link text by its figure number like "Fig. 1.1". 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. - As a special character, `%s` will be replaced to figure number. + The format of link text is same as :confval:`numfig_format`. If :confval:`numfig` is ``False``, figures are not numbered. so this role inserts not a reference but labels or link text. |