diff options
| author | Georg Brandl <georg@python.org> | 2010-08-25 09:59:53 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-08-25 09:59:53 +0000 |
| commit | 1a66c02c8f588a4a6324c3e5b9cf42b736bc1f40 (patch) | |
| tree | 6b1d45f21727c16a554402a760b30761b82e4183 /doc/markup/toctree.rst | |
| parent | 1afb5823b11927bb1d768e86a67372846a2b3c36 (diff) | |
| download | sphinx-1a66c02c8f588a4a6324c3e5b9cf42b736bc1f40.tar.gz | |
#460: Allow limiting the depth of section numbers for HTML.
Diffstat (limited to 'doc/markup/toctree.rst')
| -rw-r--r-- | doc/markup/toctree.rst | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/markup/toctree.rst b/doc/markup/toctree.rst index 2c0a418a..0b6a46c1 100644 --- a/doc/markup/toctree.rst +++ b/doc/markup/toctree.rst @@ -41,6 +41,8 @@ tables of contents. The ``toctree`` directive is the central element. document, the library index. From this information it generates "next chapter", "previous chapter" and "parent chapter" links. + **Entries** + Document titles in the :rst:dir:`toctree` will be automatically read from the title of the referenced document. If that isn't what you want, you can specify an explicit title and target using a similar syntax to reST @@ -59,8 +61,10 @@ tables of contents. The ``toctree`` directive is the central element. You can also add external links, by giving an HTTP URL instead of a document name. + **Section numbering** + If you want to have section numbers even in HTML output, give the toctree a - ``numbered`` flag option. For example:: + ``numbered`` option. For example:: .. toctree:: :numbered: @@ -71,6 +75,11 @@ tables of contents. The ``toctree`` directive is the central element. Numbering then starts at the heading of ``foo``. Sub-toctrees are automatically numbered (don't give the ``numbered`` flag to those). + Numbering up to a specific depth is also possible, by giving the depth as a + numeric argument to ``numbered``. + + **Additional options** + If you want only the titles of documents in the tree to show up, not other headings of the same level, you can use the ``titlesonly`` option:: @@ -133,6 +142,9 @@ tables of contents. The ``toctree`` directive is the central element. .. versionchanged:: 1.0 Added "titlesonly" option. + .. versionchanged:: 1.1 + Added numeric argument to "numbered". + Special names ------------- |
