Can I place partitions inside a container in reStructuredText?

I would like to write a two-column website (html) with reStructuredText and rst2html5 .

I tried like this

.. container:: right

   Right text

.. container:: left

   Left text

and it works well (css "float").

However, rst2html5 could not compile .rst with a section in the container directive with the message (SEVERE / 4). Unexpected section title or transition.

.. container:: right

   ========
   Section1
   ========

   Right text

.. container:: left

   Left text

I assume / think that the behavior of rst2html5 is fully applicable for the first specification.

I would like to get .html from .rst with rst2html5 like this.

<div class="right">
  <h1>Section1</h1>
  <p>Right text</p>
</div>
<div class="left">
  <p>Left text</p>
</div>

Is it allowed to include sections inside the container or something like that? (I think this is forbidden, right?) or How can I get a similar html output above .rst (with rst2html5)?

, 2- html.

. .

+5
1

, ReST . ReST . .

: 2 CSS , CSS3: columns .

, Docutils . . http://docutils.sourceforge.net/docs/ref/doctree.html

+2

All Articles