diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-11-23 13:31:02 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-11-23 13:31:02 +0900 |
commit | e63afbc60ec6534f3f09bb5cad1f5400da0988f1 (patch) | |
tree | d269de11f798dede9f6216829d1cb4f98081d352 /doc/markup | |
parent | 43fe104501912077dde3890b392a2518f784bef9 (diff) | |
parent | 0ee524e3922089b7ffbd6081c92968ae7dd510c7 (diff) | |
download | sphinx-git-e63afbc60ec6534f3f09bb5cad1f5400da0988f1.tar.gz |
Merge branch '1.5-release'
Diffstat (limited to 'doc/markup')
-rw-r--r-- | doc/markup/inline.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst index bd02dfa08..a59585bab 100644 --- a/doc/markup/inline.rst +++ b/doc/markup/inline.rst @@ -214,6 +214,7 @@ Cross-referencing figures by figure number .. versionchanged:: 1.5 `numref` role can also refer sections. + And `numref` allows `{name}` for the link text. .. 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. %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. so this role inserts not a reference but labels or link text. |