In reStructuredText, how to put an inline literal inside of a hyperlink?

后端 未结 2 1497
悲哀的现实
悲哀的现实 2021-01-07 20:35

In my reStructuredText document, I have a section defined like so:

Update the ``PATH`` Environment Variable
----------------------------------------
<         


        
2条回答
  •  独厮守ぢ
    2021-01-07 21:25

    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 text of the section.
    
    It refers to the section itself, see :ref:`my-reference-label`.
    

提交回复
热议问题