summaryrefslogtreecommitdiff
path: root/doc/markup
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-07 19:00:29 +0100
committerGeorg Brandl <georg@python.org>2011-01-07 19:00:29 +0100
commit554c7dd64f6aca38be6e1d26bb2cf4388f46083d (patch)
treea2318b0357a85ab129c5be18df18ce0db2759312 /doc/markup
parent3448ad3099e0c30e6901589b6bd8e181a449c6aa (diff)
downloadsphinx-554c7dd64f6aca38be6e1d26bb2cf4388f46083d.tar.gz
#454: Add more index markup capabilities: marking see/seealso entries, and main entries for a given key.
Diffstat (limited to 'doc/markup')
-rw-r--r--doc/markup/misc.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/markup/misc.rst b/doc/markup/misc.rst
index 55370de7..95899ef3 100644
--- a/doc/markup/misc.rst
+++ b/doc/markup/misc.rst
@@ -113,11 +113,28 @@ mainly contained in information units, such as the language reference.
Likewise, ``triple: module; search; path`` is a shortcut that creates
three index entries, which are ``module; search path``, ``search; path,
module`` and ``path; module search``.
+ see
+ ``see: entry; other`` creates an index entry that refers from ``entry`` to
+ ``other``.
+ seealso
+ Like ``see``, but inserts "see also" instead of "see".
module, keyword, operator, object, exception, statement, builtin
These all create two index entries. For example, ``module: hashlib``
creates the entries ``module; hashlib`` and ``hashlib; module``. (These
are Python-specific and therefore deprecated.)
+ You can mark up "main" index entries by prefixing them with an exclamation
+ mark. The references to "main" entries are emphasized in the generated
+ index. For example, if two pages contain ::
+
+ .. index:: Python
+
+ and one page contains ::
+
+ .. index:: ! Python
+
+ then the backlink to the latter page is emphasized among the three backlinks.
+
For index directives containing only "single" entries, there is a shorthand
notation::
@@ -125,6 +142,9 @@ mainly contained in information units, such as the language reference.
This creates four index entries.
+ .. versionchanged:: 1.1
+ Added ``see`` and ``seealso`` types, as well as marking main entries.
+
.. rst:role:: index
While the :rst:dir:`index` directive is a block-level markup and links to the