Am 25.03.2014 21:13, schrieb Jeet Sukumaran:
> I have a Sphinx master document which includes child documents as follows:
> 
> 
> 
>     .. toctree::
>         :maxdepth: 2
>         :numbered:
> 
>         doc1
>         doc2
>         doc3
>         doc4
>         doc5
>         doc6 
> 
> I would like to divide the TOC into parts or subsections, so that it renders
> along the lines of:
> 
>     Part 1: Title of Part 1
>        <doc1 TOC>
>        <doc2 TOC>
>     Part 2: Title of Part 2
>        <doc3 TOC>
>        <doc4 TOC>
>     Part 3: Title of Part 3 
>        <doc5 TOC>
>        <doc6 TOC>
> 
> My current approach is to create pseudo-child documents, that list the actual
> documents in their TOC, for example, "part1.rst" would have:
> 
>     .. toctree::
>         :maxdepth: 2
>         :numbered:
> 
>         doc1
>         doc2
> 
> and then in the master document:
> 
>     .. toctree::
>         :maxdepth: 3
>         :numbered:
> 
>         part1
>         part2
>         part3
> 
> The problem with this is that when clicking the link for "part1", you are 
> taken
> to a page with no real content ("part1.rst"). 

Well, there is a table of contents in there.  And you could add an introduction
to the part.

> Is there any other approach?

You can also have multiple toctree directives in a document:

Part 1
======

.. toctree::

   abc

Part 2
======

.. toctree::

   def


Georg

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to