You're reading the documentation for a version of ROS 2 that has reached its EOL (end-of-life), and is no longer officially supported. If you want up-to-date information, please have a look at Humble.
Using Sphinx for cross-referencing packages
Table of Contents
This page provides a quick guide on how you can cross-reference package documentation within rosindex using Sphinx.
Inventory files must be added to ROSIndex Sphinx’s conf.py
file found here. Note that the URI
added to the configuration file must point to the directory where the .inv
file is rather than to the file itself (i.e: https://docs.ros.org/independent/api/catkin_pkg
instead of https://docs.ros.org/independent/api/catkin_pkg/objects.inv
).
Showing all links of an Intersphinx mapping file
(Partially borrowed from here).
To show all Intersphinx links and their targets of an Intersphinx mapping file, either local or remote, run:
python -msphinx.ext.intersphinx "url-or-path-to-inv-file"
This is helpful when searching for the root cause of a broken Intersphinx link in a documentation project.
Linking to other sites using Intersphinx
(Partially borrowed from here).
You may supply an explicit title and reference target:
:role:\`title <target>\`
will refer to target, but the link text will be title.If you prefix the content with !, no reference/hyperlink will be created.
If you prefix the content with ~, the link text will only be the last component of the target. For example,
:py:meth:\`~Queue.Queue.get\`
will refer toQueue.Queue.get
but only display get as the link text.
Examples of intersphinx in action
Links to source code can be created as follows:
Note
Class vcstools.VcsClient
implements the vcstools.VcsClient.checkout()
method.
Class vcstools.VcsClient
implements the vcstools.VcsClient.checkout()
method.
Links to documentation pages:
Note
Refer to vcstools Developer’s Guide document.
Refer to vcstools Developer’s Guide document.
Links to other pages in this documentation:
Note