mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make the domain referencing role targets more specific
This commit is contained in:
parent
00758033d3
commit
26576590ed
@ -75,7 +75,7 @@ Cross-referencing Python objects
|
||||
|
||||
By default, most of these directives generate entities that can be
|
||||
cross-referenced from any part of the documentation by using
|
||||
:ref:`a corresponding role <python-roles>`. For the case of functions,
|
||||
:ref:`a corresponding role <python-xref-roles>`. For the case of functions,
|
||||
you can use :rst:role:`py:func` for that, as follows:
|
||||
|
||||
.. code-block:: rst
|
||||
|
@ -85,7 +85,7 @@ introduction paragraph in ``index.rst``:
|
||||
|
||||
Check out the :doc:`usage` section for further information.
|
||||
|
||||
The :rst:role:`doc` :ref:`role <rst-roles-alt>` you used automatically
|
||||
The :rst:role:`doc` :ref:`role <rst-roles>` you used automatically
|
||||
references a specific document in the project, in this case the ``usage.rst``
|
||||
you created earlier.
|
||||
|
||||
|
@ -128,7 +128,7 @@ The C domain (name **c**) is suited for documentation of C API.
|
||||
Describes a C type, either as a typedef, or the alias for an unspecified
|
||||
type.
|
||||
|
||||
.. _c-roles:
|
||||
.. _c-xref-roles:
|
||||
|
||||
Cross-referencing C constructs
|
||||
------------------------------
|
||||
|
@ -568,7 +568,7 @@ following fields:
|
||||
.. versionadded:: 4.3
|
||||
The ``retval`` field type.
|
||||
|
||||
.. _cpp-roles:
|
||||
.. _cpp-xref-roles:
|
||||
|
||||
Cross-referencing
|
||||
-----------------
|
||||
|
@ -120,7 +120,7 @@ The JavaScript domain (name **js**) provides the following directives:
|
||||
|
||||
Describes the attribute *name* of *object*.
|
||||
|
||||
.. _js-roles:
|
||||
.. _js-xref-roles:
|
||||
|
||||
These roles are provided to refer to the described objects:
|
||||
|
||||
|
@ -655,7 +655,7 @@ word "or"::
|
||||
:vartype a_var: str or int
|
||||
:rtype: float or str
|
||||
|
||||
.. _python-roles:
|
||||
.. _python-xref-roles:
|
||||
|
||||
Cross-referencing Python objects
|
||||
--------------------------------
|
||||
|
@ -91,7 +91,7 @@ The reStructuredText domain (name **rst**) provides the following directives:
|
||||
|
||||
Foo description.
|
||||
|
||||
.. _rst-roles:
|
||||
.. _rst-xref-roles:
|
||||
|
||||
These roles are provided to refer to the described objects:
|
||||
|
||||
|
@ -75,11 +75,11 @@ Cross-referencing objects
|
||||
|
||||
These roles are described with their respective domains:
|
||||
|
||||
* :ref:`Python <python-roles>`
|
||||
* :ref:`C <c-roles>`
|
||||
* :ref:`C++ <cpp-roles>`
|
||||
* :ref:`JavaScript <js-roles>`
|
||||
* :ref:`ReST <rst-roles>`
|
||||
* :ref:`Python <python-xref-roles>`
|
||||
* :ref:`C <c-xref-roles>`
|
||||
* :ref:`C++ <cpp-xref-roles>`
|
||||
* :ref:`JavaScript <js-xref-roles>`
|
||||
* :ref:`reStructuredText <rst-xref-roles>`
|
||||
|
||||
|
||||
.. _ref-role:
|
||||
|
@ -53,7 +53,7 @@ Be aware of some restrictions of this markup:
|
||||
These restrictions may be lifted in future versions of the docutils.
|
||||
|
||||
It is also possible to replace or expand upon some of this inline markup with
|
||||
roles. Refer to :ref:`rst-roles-alt` for more information.
|
||||
roles. Refer to :ref:`rst-roles` for more information.
|
||||
|
||||
|
||||
Lists and Quote-like blocks
|
||||
@ -281,10 +281,7 @@ at the beginning of documents. Refer to :doc:`field-lists` for more
|
||||
information.
|
||||
|
||||
|
||||
.. TODO This ref should be 'rst-roles', but that already exists. Rename the
|
||||
.. other ones
|
||||
|
||||
.. _rst-roles-alt:
|
||||
.. _rst-roles:
|
||||
|
||||
Roles
|
||||
-----
|
||||
|
Loading…
Reference in New Issue
Block a user