Force end of text / image block in org-mode html export

I want to foo foo foo ...

be aligned next to the image, but for bar bar bar ...

start a new block of text that is not aligned with fig.jpg

. Could this be organized with some special syntax in org-mode?

#+ATTR_HTML: height="100" align="left"
[[./img/fig.jpg]] 
foo foo foo ...

bar bar bar ...

      

Edit

Just wanted to add that when bar bar bar ...

it is also a different section heading, for example, ** Section 2

or something similar, it seems like the new section should not be wrapped with the previous default drawing, but perhaps there is some sort of -syntax organization to indicate this?

+3


source to share


1 answer


When you export HTML image wrapped on Wednesday <div class="figure">...</div>

. The org-mode information is #+ATTR_HTML:

added specifically to the tag <img>

in the <div>

.

If you want all of your shapes to be "floating" so that the text will wrap it, you need to change the style used in HTML. This can be done manually in the default stylesheet added at the top of the exported HTML file. The best option is to specify the style you want in the .org file itself. Something like:

#+STYLE: <style type="text/css">
#+STYLE:<!--/*--><![CDATA[/*><!--*/
#+STYLE: div.figure { float:left; }
#+STYLE: /*]]>*/-->
#+STYLE: </style>

      



at the beginning of your .org file. This will set the style of all elements <div class="figure">

that will float to the left, with text flow to the right. The following text after the picture will also wrap to the right, so you'll want to clean up the style with something like an instruction <br style="clear:both;" />

.

This worg page has a lot of information about placing shapes with captions and word wrapping . More information is available here.

+2


source







All Articles