Cross-reference to role docs.

This commit is contained in:
Georg Brandl
2011-01-06 20:44:55 +01:00
parent 9448d33d75
commit 8a3598ff8e
2 changed files with 23 additions and 0 deletions

View File

@@ -308,6 +308,8 @@ single word, like this::
:param integer limit: maximum number of stack frames to show
.. _python-roles:
Cross-referencing Python objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -438,6 +440,8 @@ The C domain (name **c**) is suited for documentation of C API.
.. c:var:: PyObject* PyClass_Type
.. _c-roles:
Cross-referencing C constructs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -522,6 +526,9 @@ The following directives are available:
Select the current C++ namespace for the following objects.
.. _cpp-roles:
These roles link to the given object types:
.. rst:role:: cpp:class
@@ -689,6 +696,8 @@ The JavaScript domain (name **js**) provides the following directives:
Describes the attribute *name* of *object*.
.. _js-roles:
These roles are provided to refer to the described objects:
.. rst:role:: js:func
@@ -740,6 +749,8 @@ The reStructuredText domain (name **rst**) provides the following directives:
Foo description.
.. _rst-roles:
These roles are provided to refer to the described objects:
.. rst:role:: rst:dir

View File

@@ -44,6 +44,18 @@ more versatile:
tool-tip on mouse-hover) will always be the full target name.
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-role:
Cross-referencing arbitrary locations