[sphinx-dev] Re: captions for literal blocks in ReST

2009-09-08 Thread Chris Withers
Max Battcher wrote: > reST uses whitespace to define blocks. Generally you want all of your > lines to line up in a directive. The particularly thing to watch out for > is that the field lines like :class: also set the expected whitespace > for the directive, so you want to make sure that your

[sphinx-dev] Re: captions for literal blocks in ReST

2009-09-08 Thread Max Battcher
Chris Withers wrote: > Guenter Milde wrote: >> The double colon starts a literal block. >> >>> Why not just: >>> .. topic:: myfile.py >>> :class:file >>> class MyClass: >>>def something(self): >>> pass > .. topic:: myfile.py > > :: >

[sphinx-dev] Re: captions for literal blocks in ReST

2009-09-08 Thread Chris Withers
Guenter Milde wrote: > The double colon starts a literal block. > >> Why not just: > >> .. topic:: myfile.py >> :class:file > >> class MyClass: >>def something(self): >> pass Okay, so the literal block works better ;-) I'm confused as to

[sphinx-dev] Re: captions for literal blocks in ReST

2009-09-01 Thread Guenter Milde
On 2009-09-01, Chris Withers wrote: > Guenter Milde wrote: >> On 2009-08-31, Chris Withers wrote: >>> Guenter Milde wrote: > Okay, I think I get this, but why the double colon on its own line? I would rather nest the literal block in a directive, a topic, say::

[sphinx-dev] Re: captions for literal blocks in ReST

2009-09-01 Thread Chris Withers
Guenter Milde wrote: > On 2009-08-31, Chris Withers wrote: >> Guenter Milde wrote: > >>> I would rather nest the literal block in a directive, a topic, say:: > >>> .. topic:: myfile.py > >>> :: > >>> class MyClass: >>> def something(self): >>> pass Okay, I thi

[sphinx-dev] Re: captions for literal blocks in ReST

2009-08-31 Thread Guenter Milde
On 2009-08-31, Chris Withers wrote: > Guenter Milde wrote: >> I would rather nest the literal block in a directive, a topic, say:: >> .. topic:: myfile.py >> :: >> class MyClass: >> def something(self): >> pass > These all sound equally fine, however, in each

[sphinx-dev] Re: captions for literal blocks in ReST

2009-08-31 Thread Chris Withers
Guenter Milde wrote: >> """ >> Suppose you wanted to compile a file such as the following:: > >>class MyClass: >> def something(self): >> pass > >> :caption:myfile.py > >> """ > > The problem with this example is ...it was just a guess on my part, but looks like it served i

[sphinx-dev] Re: captions for literal blocks in ReST

2009-08-29 Thread Guenter Milde
On 2009-08-28, Chris Withers wrote: > Hi All, > Is there any standard ReST was of doing captions for a literal block, > such as a code block? AFAIK, currently not. > just imagining: > """ > Suppose you wanted to compile a file such as the following:: >class MyClass: > def somethin