Merge pull request #3905 from TimKam/1236-add-note-referencing-arbitrary-locations

#1236 add note: omit underscore in internal ref
This commit is contained in:
Takeshi KOMIYA 2017-07-15 22:37:51 +09:00 committed by GitHub
commit d59fdda8c9

View File

@ -145,10 +145,15 @@ Cross-referencing arbitrary locations
The same works for tables that are given an explicit caption using the The same works for tables that are given an explicit caption using the
:dudir:`table` directive. :dudir:`table` directive.
* Labels that aren't placed before a section title can still be referenced * Labels that aren't placed before a section title can still be referenced,
to, but you must give the link an explicit title, using this syntax: but you must give the link an explicit title, using this syntax:
``:ref:`Link title <label-name>```. ``:ref:`Link title <label-name>```.
.. note::
Reference labels must start with an underscore. When referencing a
label, the underscore must be omitted (see examples above).
Using :rst:role:`ref` is advised over standard reStructuredText links to Using :rst:role:`ref` is advised over standard reStructuredText links to
sections (like ```Section title`_``) because it works across files, when sections (like ```Section title`_``) because it works across files, when
section headings are changed, and for all builders that support section headings are changed, and for all builders that support