View Single Post
Old 01-20-2011, 02:46 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
You should apply a smallcaps style or pseudo smallcaps {text-size:80%} to those capitalized words - the reason they're showing up like that is they were smallcaps in the original book, but the sizing clues are often lost during OCR conversion.

You can find them via regex and wrap them with span tags using search and replace a regex something like this would be a good place to start:

Code:
([A-Z]{2,})
and replace with something like this:
Code:
<span style="smlcps">\1</span>
And then add the style 'smlcps' to you're css with appropriate sizing.

You could also do something like this:
Code:
([A-Z])([A-Z]{2,})
and replace with this:
Code:
\1<span style="lower">\2</span>
and use this in your css:
Code:
.lower {
   text-transform:lowercase;
}
However I'm pretty sure a lot of readers don't support text-transform (it may not even be part of the epub spec), while almost all will follow the font size changes.

Last edited by ldolse; 01-20-2011 at 02:52 AM.
ldolse is offline   Reply With Quote