On 2011-01-13, TP wrote:

>>> For HTML generation, I did something like this by doing:

>>>    ===============
>>>    My Normal Title
>>>    ===============

>>>    .. container::
>>>       :class: subtitle

>>>       This is My Very Long Subtitle |BR| That Spans Two Lines
>>>       By Using a <br />

>>>    .. |BR| replace:: :raw-html:`<br />`

>>> and creating a custom CSS style for my new "subtitle" class to make
>>> its font larger than normal. Maybe you can do something similar for
>>> LaTeX?

...

> "container" is the standard docutils directive documented at
> http://docutils.sourceforge.net/docs/ref/rst/directives.html#container.
> ":class:"  is an option for that directive. It generates something
> like the following HTML:

>     <div class="class subtitle container">
>     This is My Very Long Subtitle <span class="raw-html"><br /></span>
>     That Spans Two Lines By Using a &lt;br /&gt;
>     </div>

> After rereading the above mentioned documentation on "container", I
> see that I should probably have done the following:

>     .. container:: subtitle

> Which generates the clearer:

>     <div class="subtitle container">

How about using two paragraphs instead of a hard line break? ::

    .. container:: subtitle

       This is My Very Long Subtitle
       
       That Spans Two Lines

This translates to::

    <div class="subtitle container">
    <p>This is My Very Long Subtitle</p>
    <p>That Spans Two Lines</p>
    </div>
    <div class="subtitle container">
    <p>This is My Very Long Subtitle</p>
    <p>That Spans Two Lines</p>
    </div>

which could be styled with CSS rules like::

 div.subtitle.container > p {margin: 0px;}

Drawback: This does not word for LaTeX where the class arguments are
ignored.

Günter



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