marianoguerra / rst2html5

transform restructuredtext documents to html5 + twitter's bootstrap css, deck.js or reveal.js
http://marianoguerra.github.com/rst2html5
MIT License
177 stars 51 forks source link

Placement of text relative to images #22

Closed pcav closed 11 years ago

pcav commented 11 years ago

The placement of text relative to images does not work well: it it is too long, it does not wrap, and it is placed below the image. The directives of the type :align: right etc. do not seem to be honnoured. Example:

Cool stuff: cartography

.. image:: images/fill_jp.png :width: 350 px :align: right

places the text on the side, whereas

Cool stuff: cartography

.. image:: images/fill_jp.png :width: 350 px :align: right

places the text at the bottom, no wrap

marianoguerra commented 11 years ago

it's just a matter of adding css to a stylesheet, here I added the following style to the default css file:

img.align-left{                                                            
 float: left;                                                              
}                                                                          

img.align-right{                                                           
 float: right;                                                             
} 

and got the following result:

rst-align

is that what you want?

if you don't use the default stylesheet you can paste that css on yours.

pcav commented 11 years ago

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Il 05/04/2013 18:37, Mariano Guerra ha scritto:

it's just a matter of adding css to a stylesheet, here I added the following style to the default css file:

looks fine, thanks a lot!


Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlFe/mIACgkQ/NedwLUzIr6o5gCfQ1Pbsk76I1E5r+IRBXhFopLf oBQAnjPD+INcBHanLocR/ZOebI4Nksck =gu+A -----END PGP SIGNATURE-----

pcav commented 11 years ago

I have back the same problem, even from a fresh install, on Chromium. On FF, it works as expected.

pcav commented 11 years ago

I suggest reopening this, but I see no way to do it.