To cross-reference to arbitrary locations within one document,
use the ref
role.
Reference target names need to start with an underscore.
For example, .. _example:
. However, the reference itself should not
have the underscore preceding the reference. For example, example
.
For more information on referencing, see Internal Hyperlink Targets.
Input
.. _cg_titles:
Titles
~~~~~~
This is the section we want to reference to.
...
The following - :ref:`cg_titles` - generates a link to the section with
the defined label using this section heading as a link title.
A link label and a reference can be defined in separate source files,
but within one directory. Otherwise, use the external linking.
Output
...
The following - Titles - generates a link to the section with the defined label using this section heading as a link title.
A link label and a reference can be defined in separate source files, but within one directory. Otherwise, use the external linking.
To link to some external locations, format the RST source as follows:
Link text <http://web-link.com>
wrapping it in backticks.Input
Here is a link to the User guide: https://docs.openstack.org/user-guide/.
Here is an external web link with a link title:
`User guide <https://docs.openstack.org/user-guide/>`_.
Output
Here is a link to the User guide: https://docs.openstack.org/user-guide/.
Here is an external web link with a link title: User guide.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.