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
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
>
> ::
>
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
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::
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
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
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
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