In Restructuredtext, How To Put An Inline Literal Inside Of A Hyperlink?
In my reStructuredText document, I have a section defined like so: Update the ``PATH`` Environment Variable ---------------------------------------- I would like to link to this s
Solution 1:
With a workaround, yes -- it is possible (hinted from @mzjn's comment).
For example:
.. |dummy| replace:: Update the ``PATH`` Environment Variable
.. _dummy:
Update the ``PATH`` Environment Variable
----------------------------------------
* |dummy|_
This is achieved by taking advantage of the replace directive.
Solution 2:
Taken from the Sphinx documentation:
If you place a label directly before a section title, you can reference to it with
:ref:`label-name`
.
Example:
.. _my-reference-label:
Section to cross-reference
--------------------------
This is the textof the section.
It refers to the section itself, see :ref:`my-reference-label`.
Post a Comment for "In Restructuredtext, How To Put An Inline Literal Inside Of A Hyperlink?"