diff options
author | tk0miya <i.tkomiya@gmail.com> | 2014-10-09 19:31:36 +0900 |
---|---|---|
committer | tk0miya <i.tkomiya@gmail.com> | 2014-10-09 19:31:36 +0900 |
commit | 4c2e295c95e831a77633c1c092b630a6258155e7 (patch) | |
tree | e0671f0f65b239c72021d866cbbe734872182543 | |
parent | a6010b852f2435091058eeabf3d22bc37a05090e (diff) | |
download | sphinx-4c2e295c95e831a77633c1c092b630a6258155e7.tar.gz |
Add docs about :numref: role
-rw-r--r-- | doc/markup/inline.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst index b5bb8d0c..6f3ebe1c 100644 --- a/doc/markup/inline.rst +++ b/doc/markup/inline.rst @@ -201,6 +201,24 @@ Referencing downloadable files suitable link generated to it. +Cross-referencing figures by figure number +------------------------------------------ + +.. versionadded:: 1.3 + +.. 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". + + If an explicit link text is given (like usual: ``:doc:`Image of Sphinx (Fig. + #) <my-figure>```), the link caption will be the title of the reference. + As a special character, `#` will be replaced to figure number. + + If :confval:`numfig` is ``False``, figures are not numbered. + so this role inserts not a reference but labels or link text. + Cross-referencing other items of interest ----------------------------------------- |