summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/documenting/markup.rst18
-rw-r--r--Doc/tools/sphinxext/download.html2
2 files changed, 16 insertions, 4 deletions
diff --git a/Doc/documenting/markup.rst b/Doc/documenting/markup.rst
index a919468797..9bb51931ef 100644
--- a/Doc/documenting/markup.rst
+++ b/Doc/documenting/markup.rst
@@ -290,10 +290,22 @@ they should be marked simply with ``*var*``.
For all other roles, you have to write ``:rolename:`content```.
-.. note::
+There are some additional facilities that make cross-referencing roles more
+versatile:
+
+* You may supply an explicit title and reference target, like in reST direct
+ hyperlinks: ``:role:`title <target>``` will refer to *target*, but the link
+ text will be *title*.
+
+* If you prefix the content with ``!``, no reference/hyperlink will be created.
+
+* For the Python object roles, if you prefix the content with ``~``, the link
+ text will only be the last component of the target. For example,
+ ``:meth:`~Queue.Queue.get``` will refer to ``Queue.Queue.get`` but only
+ display ``get`` as the link text.
- For all cross-referencing roles, if you prefix the content with ``!``, no
- reference/hyperlink will be created.
+ In HTML output, the link's ``title`` attribute (that is e.g. shown as a
+ tool-tip on mouse-hover) will always be the full target name.
The following roles refer to objects in modules and are possibly hyperlinked if
a matching identifier is found:
diff --git a/Doc/tools/sphinxext/download.html b/Doc/tools/sphinxext/download.html
index 5f625620c1..0de9c2a062 100644
--- a/Doc/tools/sphinxext/download.html
+++ b/Doc/tools/sphinxext/download.html
@@ -31,7 +31,7 @@ in the table are the size of the download files in megabytes.</p>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.tar.bz2">Download</a> (ca. 4 MB)</td>
</tr>
<tr><td>Plain Text</td>
- <td><a href="{{ dlbase }}/python-docs-text.zip">Download</a> (ca. 2 MB)</td>
+ <td><a href="{{ dlbase }}/python-{{ release }}-text.zip">Download</a> (ca. 2 MB)</td>
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.tar.bz2">Download</a> (ca. 1.5 MB)</td>
</tr>
</table>