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 its purpose ;-)

> I would rather nest the literal block in a directive, a topic, say::
> 
>   .. topic:: myfile.py
>   
>     ::
>   
>       class MyClass:
>          def something(self):
>             pass
> 
> or a to-be-found-or-defined caption-taking directive::
> 
> 
>   .. directive-with-arbitrary-content-and-caption::
>   
>     ::
>   
>       class MyClass:
>          def something(self):
>             pass
> 
>    :caption: myfile.py
> 
> or define a :caption: argument for the code-block directive::
> 
>   .. code-block:: python
>      :caption: myfile.py
>   
>       class MyClass:
>          def something(self):
>             pass
> 
> (here, the caption can be distinguished from the literal block by the blank
> line).

These all sound equally fine, however, in each case:

- what Sphinx plugins do I need to write to make them work?

- what happens when those plugins aren't available?
   (such as in the long_description for a package on PyPI)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk

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

Reply via email to