In my reStructuredText document, I have a section defined like so:
Update the ``PATH`` Environment Variable
----------------------------------------
I would like to link to this section like so:
* `Update the ``PATH`` Environment Variable`_
But, when this code is rendered to HTML, it comes out looking like this:
I'd really like the environment variable PATH
to appear in the literal style, but I am pretty new to this. Can anyone help me out?
For comments, add 2 periods .. followed by a newline and then your comment indented.
Literal code blocks (ref) are introduced by ending a paragraph with the special marker :: . The literal block must be indented (and, like all paragraphs, separated from the surrounding ones by blank lines): This is a normal text paragraph.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With