Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reStructuredText link to section with custom text

I'm aware of the documentation regarding implicit hyperlinks in the reStructuredText manual, but I'm wondering if it is possible to reference a section without having to repeat the full section title. E.g. if I take the example from the documentation,

Titles are targets, too 
======================= 
Implict references, like `Titles are targets, too`_.

then I'd like to have a way to refer to the section by using a different link name (e.g `the target section`_). How can I do that?

like image 970
mdomke Avatar asked Jan 25 '16 10:01

mdomke


1 Answers

You can refer to a section titled Titles are targets, too with:

`link text <Titles are targets, too_>`_

This creates a link whose text is link text but points to the section titled Titles are targets, too.

like image 105
Louis Avatar answered Oct 19 '22 23:10

Louis