-
Notifications
You must be signed in to change notification settings - Fork 19
Linking to internal pages and API reference in Sphinx
The following gives an overview of how you can link to various targets in Sphinx.
Link to label inside tudat-space
:
:ref:`getting_started_quickstart`
where the label is defined as
.. _getting_started_quickstart:
will be rendered as Quickstart: Tudat(Py) in 10 minutes
Link to file inside tudat-space
:
:ref:`/_src_getting_started/quickstart.rst`
will be rendered as Quickstart: Tudat(Py) in 10 minutes
This is not preferred, as the file path may change.
However, if you want to link to a file, use absolute paths (relative to the conf.py
file, with a prepended /
such that the link does not break if you move the file where the link is placed).
Custom link text:
:ref:`Slowstart in 30 minutes <getting_started_quickstart>`
will be rendered as Slowstart in 30 minutes.
For all module-level references, use the :doc:
directive:
:doc:`index`
will be rendered as API Reference.
:doc:`astro`
will be rendered as astro.
:doc:`element_conversion`
will be rendered as element_conversion
:class:`tudatpy.numerical_simulation.propagation_setup.propagator.TranslationalStatePropagatorSettings`
will be rendered as tudatpy.numerical_simulation.propagation_setup.propagator.TranslationalStatePropagatorSettings
.
Links can be shortened to last part of the link by using the ~
symbol:
:class:`~tudatpy.numerical_simulation.propagation_setup.propagator.TranslationalStatePropagatorSettings`
will be rendered as TranslationalStatePropagatorSettings
.
:attr:`~tudatpy.numerical_simulation.propagation_setup.propagator.TranslationalStatePropagatorSettings.acceleration_settings`
will be rendered as acceleration_settings
.
:attr:`~tudatpy.numerical_simulation.propagation_setup.propagator.MultiTypePropagatorSettings.propagator_settings_per_type`
will be rendered as propagator_settings_per_type
.
:meth:`~tudatpy.numerical_simulation.propagation_setup.propagator.TranslationalStatePropagatorSettings.get_propagated_state_size()`
will be rendered as get_propagated_state_size()
:func:`~tudatpy.numerical_simulation.propagation_setup.propagator.translational()`
will be rendered as translational()
:class:`~tudatpy.numerical_simulation.propagation_setup.propagator.TranslationalPropagatorType`
will be rendered as TranslationalPropagatorType