Thanks a lot! Works like charm!

Aivar

On Thursday, August 29, 2013 7:00:01 PM UTC+3, Bernhard Grotz wrote:
>
>
> Hello Aivar! 
>
> * Aivar Annamaa <[email protected] <javascript:>> [29.08.2013 17:40]: 
> > Hi! 
> > 
> > I'd like to divide my book into 3 parts each containing several 
> chapters. 
> > Also, I'd like to keep separate chapters in separate files (and ideally 
> > also part openers in their own files). 
> > 
> > Looks like reST always interprets first heading in a file as top-level 
> > heading. *Is there a way to explicitly define the level of the 
> heading?*Otherwise my chapter headings turn to part headings, unless I keep 
> all 
> > chapters of a part in same rst file. 
>
> Perhaps you can try the following document structure: 
>
> --- 
>
> maindir/ 
>         index.rst 
>         part1/index.rst 
>         part1/chapter1.rst 
>         part1/chapter2.rst 
>         part2/index.rst 
>         part2/chapter3.rst 
>         part2/chapter4.rst 
>         part3/index.rst 
>         part3/chapter5.rst 
>         part3/chapter6.rst 
>         ... 
>                          
> --- 
>
> The main index.rst file should contain a toctree like 
>
> --- 
>
> .. toctree:: 
>     :maxdepth: 2 
>
>         part1/index.rst 
>         part2/index.rst 
>         part3/index.rst 
>         ... 
>          
> --- 
>
> Each part*/index.rst file should contain a toctree like 
>
> --- 
>
> .. toctree:: 
>     :maxdepth: 2 
>
>         chapter1.rst 
>         chapter2.rst 
>         ... 
>
> In this way, the parts/chapters/sections can be nested recursively to any 
> depth. 
> If one chapter grows too large, create a new folder at the respective 
> directory, 
> move the chapter-foo.rst file to chapter-foo/index.rst and change the 
> toctree of 
> the index.rst file in the upper directory. 
>
> Hope this helps... 
>
>
> Bernhard 
>
>

-- 
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/groups/opt_out.

Reply via email to