View Single Post
Old 05-19-2020, 10:10 AM   #7
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
Quote:
Originally Posted by najgori View Post
Before starting to work on epub I prefer to clean HTML to basic tags without any styling.
Step 1 is to open epub in Calibre editor, delete all css files, go to Remove unused css rules tool
Step 2 is Custom cleaner plus in Sigil for the rest of bookmarks, ids...
From Sigil you can export (x)html to editor of your choice or continue working in Sigil editor.
If you delete all css files then remove css rules you may well have got rid of important formatting. Some books, instead of
Code:
 <i> some italics></i>
will instead use something like
Code:
<span class="it"> some italics </span>
and use
Code:
.it {
 font-style: italic;
}
in styles.css or in css defined in the file header.

by using a brute-force technique as suggested all italics would be lost. There may also be "headers" that are just paragraphs styled to centred, bold and larger than the main text.

Look before you carry out drastic surgery.

BobC
BobC is offline   Reply With Quote