On Fri, Oct 12, 2012 at 11:54 AM, cornelius
<[email protected]> wrote:
> Hi,
>
> I think writing my own theme. I'd like to have some styles for paragraphs.
>
> I saw that I can define a role,
>
> .. role:: pleasenote
>     :class: pleasenote
>
> which will produce a html span with the class "pleasenote".
>
> But i'd like to produce a div, to be able to define paragraphs and some kind
> of text boxes.

Roles are usually for inline elements.  I think what you are wanting
is a "directive" that you can put block level elements in.

The "container" directive[1] might do what you want.  It produces a
div with a specified class.

.. container:: my-class

   Nested paragraph 1.

   Nested paragraph 2.


There are also some built-in directives with custom classes you could
use, like "note" and "warning". [2]

[1] http://docutils.sourceforge.net/docs/ref/rst/directives.html#container
[2] http://sphinx.pocoo.org/markup/para.html

-- 
Jonathan Waltman

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