View Single Post
Old 09-14-2014, 08:22 AM   #9
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by eschwartz View Post
This is meant to only target the css, whether in a stylesheet or in <style> tags. It searches for the font-weight or -style, and ignores what sgc-class it actually is.
Won't that leave all the text using those styles with undefined styles?


The problem is that in one file
<p class="p6 sgc-2">October 11</p> is bold, in another it would be italic.


Quote:
To fix the text (my preference), I'd use:

Find:
Code:
<span class="(?:(b)old|(i)talic)">([^<>]*)</span>
Replace:
Code:
<\1>\2</\1>
And revert it back to <b> and <i> tags.
That looks useful, but first I need to get all the text tagged consistently.

Anyway, I think I can do this by unzipping the epub and sorting the files into groups with common style definitions, using Far file manger, then doing S&R on groups of files to make them all consistent, then making a new epub.
AlanHK is offline   Reply With Quote