diff options
author | Georg Brandl <georg@python.org> | 2008-12-28 19:44:54 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-12-28 19:44:54 +0100 |
commit | 78dec65bcccf002332aa9fe9516311d6eb8c570a (patch) | |
tree | 50aed09c5f3461f6fbc68dc3cf0117f3e5f338d5 /doc/markup | |
parent | a2363c0751f82e8639a7732dd93c1d095a132792 (diff) | |
download | sphinx-git-78dec65bcccf002332aa9fe9516311d6eb8c570a.tar.gz |
Due to popular demand, added a ``:doc:`` role which directly
links to another document without the need of creating a
label to which a ``:ref:`` could link to.
Diffstat (limited to 'doc/markup')
-rw-r--r-- | doc/markup/inline.rst | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst index fc5d08df3..5776c35e1 100644 --- a/doc/markup/inline.rst +++ b/doc/markup/inline.rst @@ -223,7 +223,26 @@ to labels: Using :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 cross-references. - + + +Cross-referencing documents +--------------------------- + +.. versionadded:: 0.6 + +There is also a way to directly link to documents: + +.. role:: doc + + Link to the specified document; the document name can be specified in + absolute or relative fashion. For example, if the reference + ``:doc:`parrot``` occurs in the document ``sketches/index``, then the link + refers to ``sketches/parrot``. If the reference is ``:doc:`/people``` or + ``:doc:`../people```, the link refers to ``people``. + + If no explicit link text is given (like usual: ``:doc:`Monty Python members + </people>```), the link caption will be the title of the given document. + Other semantic markup --------------------- |