diff --git a/doc/usage/restructuredtext/directives.rst b/doc/usage/restructuredtext/directives.rst index 0e2930526..e8b88c21b 100644 --- a/doc/usage/restructuredtext/directives.rst +++ b/doc/usage/restructuredtext/directives.rst @@ -569,21 +569,21 @@ __ http://pygments.org/docs/lexers print 'Explicit is better than implicit.' - .. versionadded:: 1.3 - In order to cross-reference a code-block using either the :rst:role:`ref` or the :rst:role:`numref` role, it is necessary that both :strong:`name` and :strong:`caption` be defined. The argument of :strong:`name` can then be given to :rst:role:`numref` to generate the cross-reference. Example:: - See :numref:`this-py` for an example. + See :numref:`this-py` for an example. When using :rst:role:`ref`, it is possible to generate a cross-reference with only :strong:`name` defined, provided an explicit title is given. Example:: - See :ref:`this code snippet ` for an example. + See :ref:`this code snippet ` for an example. + + .. versionadded:: 1.3 .. rst:directive:option:: dedent: number :type: number or no value