Epub formatting - tables or

I’m trying to format an ebook. If I stick to plain straightforward text, as much of the book has, I have no issues. However, I need to format sections of text where some sentences are offset, that is, preceded with a small image, and then where the lines below are aligned with those above, as if having an empty space before them equal to the dimensions of the small image above.
Tables seemed to be the obvious way to go, but once they are exported, or compiled to Epub format the line spacing appears inconsistant and varies significantly according to whether you’re viewing on Digital Editions or in Calibre.
I’ve also tried converting the tables to images which again seems to produce inconsistant results.
Here’s an example of what I’m trying to achieve.


Is there a way to do this without using tables, i.e., inserting a small image, and being able to format a space or margin that would align all following text?
I imagine there’s probably a simple solution. Thanks in advance.

You know, I’m tempted to say that in this case it would be best to find another way to express this information.

  • Hanging indents are achievable with HTML, but in my experience they don’t render well on in ePub (there isn’t really a formal CSS rule for them, you have to kind of hack it with a negative text indent balanced against a block left indent and it is the negative value that trips up simpler renderers).
  • Likewise, tables are not really well supported by devices yet, and you may find that many of them force cell line borders, which would completely defeat the purpose for you.
  • Using images for this also wouldn’t be the best idea, because then you deprive your readers the ability to find anything located within one of these lists, in a text search.

So those are the challenges with all of the good methods for performing this kind of formatting, to the best of my knowledge. I would encourage further research because I only spent about fifteen minutes testing these various techniques before coming to these conclusions.

An alternating dialogue style of bold and regular text may work better, if it isn’t as pretty.

If you look at AmberV’s response, you see a way this might be done: as a list. Inserting images instead of bullet points likely goes beyond epub renderers though. You could use a unicode symbol that is a small graphic, but then you are depending on the epub renderer’s ability to display that unicode symbol, which is often a question of: Does that symbol have a corresponding glyph in the font the renderer uses? Looking at the Nook guidelines for example, the official documentation still, the last time I looked at it, was not even supporting typographical quotation marks (though I am sure that in fact Nook does). That means just try something and see how it goes.

Unhappily, uncommon formatting in HTML-derived ebook formats that appear on a variety of devices with different screen sizes and aspect ratios is not very far advanced. Even something so basic as a blockquote does not display well on the Kindle, for example. This applies to the Kindle format and (to an even greater degree) to epub. The situation is rather like that of web page rendering 16 years ago when different browsers had different ways of rendering code – only if anything it is worse. Real, cross-platform standards will develop eventually, but not yet.

– asotir

Thanks Amber and asotir for your replies, I appreciate it. I may well have to make some compromises.
However, the more I’ve worked with the tables the more it appears to work - but obviously I’m apprehensive about spending a lot of time on something that will turn out to be a problem later on.

The best thing to do is make a test chapter and then compile it to ePub and Mobi, then load it in as many simulators and readers as you can. At the least, Nook, ADE, Calibre, iBooks, Kindle Previewer (in all device modes) and Kindle Desktop. Kobo is a rising star as well, but I don’t know as much about simulating its rendering on a computer. I ended up buying one of the cheap minis so that I could do testing with it. My concern with using tables for layout would be with anything that runs on a low screensize, like smart phone readers, and any of the older legacy devices. Anything Kindle G1–3 is going to look fairly awful with tables in my experience. If you have no intention of ever doing business with Amazon though, maybe that isn’t a problem.