Re: Nested, titled sections

David Goodger <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <CABiJP=LaMK3YaqDS3SpnLx2BQ+q+ACT_rMjG8f-FBxeH4D8hXg@mail.gmail.com>
On Tue, Apr 14, 2015 at 1:54 PM, Jeffrey C. Jacobs
<[email protected]> wrote:
> Is there a way to nest a titled section.

In the strictest sense, only in the normal way, via the normal
hierarchy of sections and subsections etc. But that doesn't do what
you want.

> For instance, say we have text::
>
> All About Dogs
> ~~~~~~~~~~~~~~
>
> Aren't Dogs great?  Let's talk about a breed.
>
>    Poodle
>    ------
>
>    Poodles are the smartest dog.  They come in full and toy sizes.
>
> So let's talk about a different dog.
>
>    Beagle
>    ------
>
>    Beagles are noisy.  Snoopy was a beagle.
>
> And how about another Dog.
>
> In this example, I've incorrectly indented the headings for the
> subsections to make it clear where each subsection ends but this isn't
> valid RST.

Exactly. There is no way apart from some mechanism like this. And the
output should also format such segments in a distinctive way,
otherwise the document will not make sense to the reader.

> What's the right way to specify a limited-scope subsection?

Use "topic" or "sidebar" directives. Probably topic:
http://docutils.sourceforge.net/docs/ref/rst/directives.html#topic

-- 
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.