EPubHacks

From MobileRead
Jump to: navigation, search

Note: Please try if you can to specify the version of the software you are testing against. In some cases, a hack may be no longer needed after the reading software has been updated.


[edit] Adobe Digital Editions

Problem

Ignores CSS "font-variant:small-caps;"

Hack

First, the text must be all caps. Then you must tag the first letter of the word as well as the rest of the word like this:

<span class="small-caps-first">S</span><span class="small-caps-rest">UBJECT</span>

Then use the CSS of your choice to make the class "small-caps-rest" in smaller text.

One very unfortunate down side to this hack is that the Nook will treat your word as two words separated by the spans. So, in this example, if your word gets too close to the edge it will leave the "S" at the end of the line and wrap "UBJECT" down to the beginning of the next line. Ugh-ly!


Problem

In some ereaders and ereader software based on Adobe Digital Editions, margins can show up VERY large all the way around the text.

Solution

Some older versions of Adobe InDesign create *.xpgt files that serve no purpose in epub. Delete any *.xpgt files in your epub and any reference to them in the heads of your html files and your opf file. See this discussion.

[edit] iBooks

Problem

Alignment instructions applied to a class on a span tag are ignored.

Hack

Insert empty span tags within the span with the class. For example:

<span class="float-right"><span>Pull Quote</span></span>
Personal tools
Namespaces
Variants
Actions
Navigation
MobileRead Networks
Toolbox
Advertisement