View Single Post
Old 04-26-2013, 03:47 AM   #15
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Toxaris View Post
You can try:

search: <li>(.*?)</li>
replace: <li class="small-caps">\1</li>
That won't take care of the capitalization. I.e. the result will be pretty much the same, because applying small caps to an upper case string will still display the string as all caps.

@dwlamb: You could try the following:

search: <li>([[:upper:]| ]+)</li>
replace: <li>\L\1</li>

This will change all upper case list items to lower case, and if you're using a Webkit based ebook app (Kindle, iBooks etc.), you could fix the capitalization issue by applying a text-transform style to the <li> element and/or add text-transform: capitalize; to your small-caps style.

Code:
li {text-transform: capitalize; font-variant: small-caps;}
If that's not an option, you'll probably have to come up with custom search & replace strings for two or more upper case words, or use a scripting language.
Doitsu is offline   Reply With Quote