On 2011-08-23, Gaël Varoquaux wrote:

> I have a biggish document written in Sphinx (yeah go go go Sphinx!):
> http://scipy-lectures.github.com/

> It has 'parts', and chapters below them, as you can see from the above page.

> So far the parts where just implemented as an extra layer of headers. The 
> problem is that it induces a heavily nested structured, with section numbers 
> such as 2.1.1.2.1.

> I'd like to:

> Either insert titles in the middle of the toc, as it is currently the case 
> on http://scipy-lectures.github.com/. These would act as part separators. It 
> tried by putting two toctree one after the other, but the number starts 
> again at 1 in each new toc.

> Either change the number on the parts to be capital alphabetic characters, 
> as in "A.1.1.2.1".

> Any suggestions on how to achieve similar goals?

The rst "sectnum" directive has options for the start number and a number
prefix.

I don't know, how this interacts with Sphinx document merging, though.

http://docutils.sf.net/docs/ref/rst/directives.html#automatic-section-numbering


Also, the Docutils LaTeX writer has a 

  --use-part-section      Add parts on top of the section hierarchy.

config setting, that in connection with 

  --no-section-numbering  Disable section numbering by Docutils.
                          (i.e. enable numbering by LaTeX)
  
will use \part for the top section level.

Again, I don't know how this works out in Sphinx.

Günter  
  

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to