I was able to get nice text wrapping around the image.
I tested the following document with Asciidoctor ver. 1.5.4 and ver. 1.5.5.
= Text Wrapping
Iced, fair trade, crema, doppio as roast, dripper sit trifecta sweet crema, robust blue mountain eu, robusta cinnamon crema plunger pot barista french press, whipped, brewed, aftertaste arabica eu blue mountain con panna caramelization instant grounds breve. Robust, redeye latte rich coffee saucer cortado sweet cup rich, medium, froth, as, affogato single shot grinder mug cappuccino, decaffeinated and, white mug affogato filter, strong chicory saucer carajillo whipped. Crema, mug et, and mazagran redeye, single origin decaffeinated whipped sugar that, cream fair trade crema java cream shop fair trade carajillo strong, white fair trade spoon decaffeinated coffee, cup variety frappuccino plunger pot, et roast whipped americano carajillo. Con panna skinny, eu, saucer single origin strong sweet id variety, cultivar viennese skinny, variety, grinder single origin sit, a, spoon fair trade, medium so id cinnamon extraction.
The problem is that wrapping text around an image is very difficult to do with Prawn, esp when you don't know the content ahead of time. Unlike with HTML, the converter has to place every single character on the canvas where it needs to go (and within surprisingly little control over line arrangement). And that means you have to know how much space the content is going to take up before you place anything on the canvas. It gets complicated very quickly considering an AsciiDoc document can have countless permutations of blocks.
This could be at least partially addressed if Prawn had a straightforward way to "undo" operations. Sadly, it does not. Once you write into the PDF, it's like you are writing with permanent marker. We've found ways around this by using a scratch document, but each time we do that, it slows down the processor considerably (one of main reasons Asciidoctor PDF is so much slower).
On Wed, Mar 8, 2017 at 5:48 AM, pwillard [via Asciidoctor :: Discussion] <[hidden email]> wrote:
In the famous words of Jaime Hyneman of Mythbusters, "There's your problem"
Since... "It's not (yet) implemented in the PDF converter. "
If you reply to this email, your message will be added to the discussion below:
Using tables is one way to control the layout. Just set frame=none,border=none,stripe=none (stripe control is in the upcoming release) on the table. Then, you can put an image to the left or right of a column of text. The text won't wrap around the image, but at least it will be to the side.
> Is it unreasonable to think narrowly and maybe see if there is a way to emulate an assertion with a custom left side image with asciidoctor-pdf?
That's exactly what I did in editions, which is a magazine layout tool. You can see the override code I used here: