mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
commit
d59fdda8c9
@ -145,10 +145,15 @@ Cross-referencing arbitrary locations
|
||||
The same works for tables that are given an explicit caption using the
|
||||
:dudir:`table` directive.
|
||||
|
||||
* 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:
|
||||
* Labels that aren't placed before a section title can still be referenced,
|
||||
but you must give the link an explicit title, using this syntax:
|
||||
``: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
|
||||
sections (like ```Section title`_``) because it works across files, when
|
||||
section headings are changed, and for all builders that support
|
||||
|
Loading…
Reference in New Issue
Block a user