asciidoctor-epub3 icon indicating copy to clipboard operation
asciidoctor-epub3 copied to clipboard

Images cannot float in EPUB rendering

Open Thanatermesis opened this issue 2 years ago • 5 comments

When trying to align an image with text is not possible, I have tried all the possible options without success Example code:

== Test section
.Title for image
image::einstein-relatividad.jpg[,340,role="related thumb left"]
Lorem Ipsum is simply dummy text of the printing a.....

So the HTML rendering (asciidoctor) renders very good, like:

HTML:

image


But for PDF or for EPUB3, it always renders it in a strange and unfriendly way (I tried different options for the images, nothing found to work nicely yet):


Epub:

image


PDF:

image

Thanatermesis avatar Aug 02 '21 01:08 Thanatermesis

Can you please repost your entire report here?

mojavelinux avatar Aug 02 '21 06:08 mojavelinux

done

Thanatermesis avatar Aug 02 '21 15:08 Thanatermesis

My advice here would be to go ahead and add the same styles that are present in the default stylesheet. The reason I didn't add them originally is because many ePUB readers won't honor them. But that's really up to the writer to decide whether to use layouts that are only supported in a handful of ePUB readers. Caveat emptor.

mojavelinux avatar Aug 02 '21 20:08 mojavelinux

So what would happen in the case an epub reader (let's say "kindle") cannot read this style? it just switches to the default mode ? (first image, then text) or it directly don't show it? so if fallbacks to a different styling i don't see the problem

Thanatermesis avatar Aug 02 '21 21:08 Thanatermesis

It would just ignore the request to float the image and display it as it currently appears.

mojavelinux avatar Aug 02 '21 21:08 mojavelinux