06-27-2013, 03:19 AM | #1 |
%20ErrorParse$$#0fh%20
Posts: 97
Karma: 497572
Join Date: Sep 2008
Location: At home. Dur!
Device: KindleKB (fixed battery!) and a new Kobo Glo!
|
Strip all formatting?
Morning all.
As I'm having some difficulty with the formatting of a couple of epubs I have I would like to work out some method for stripping out all of the formatting as it stands and then applying some basic formatting rules after that. I use Calibre to manage my books but I also have Sigil installed from an abortive attempt to reformat a malformed book (a whole series of books mashed together in one humongous file - it didn't go well!) if anyone can offer some help as to how to go about this then I would be very grateful. Regards Piggly |
06-27-2013, 03:51 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Delete all CSS files, all <style> elements in the headers and all "style=..." attributes in other elements.
|
Advert | |
|
06-27-2013, 05:00 AM | #3 |
Evangelist
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
|
Be careful not to remove any bolds or italics, which quite frankly are the essence - or the soul of a book.
Edit: I know that ABBYY FineReader will set various styles and sizes, when in fact there's just one size (and style) for the body text throughout the entire book! It also assigns styles for bolds and italics, when in fact it should be using "<em>" and "<strong>" tags. Edit #2: In order to strip the bad FineReader formatting, I always export from FineReader as RTF, open it in Word 2010 and run my custom macro (from the signature). Then I redo the layout (using styles) in InDesign - or, alternatively in Word using quick styles and then export as HTML. Last edited by DSpider; 06-27-2013 at 05:21 AM. |
06-27-2013, 05:57 AM | #4 |
Fanatic
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
|
On a few desperate occasions, I've imported the epub xhtml files into a browser and saved it as pure text. Since I am a command line fanatic, I used lynx (lynx -dump file.xhtml > file.txt.
To preserve some of the formatting like italic and bold, I did a search and replace on the xhtml file first (e.g. <em> -> {em}) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[KOBO] Strip existing formatting to apply my own default formatting to all books | digital_steve | Calibre | 2 | 08-10-2010 06:34 PM |
Calibre and FORMATTING how to stop it altering my formatting? | nerys | Calibre | 37 | 07-23-2010 02:35 AM |
Calibre and FORMATTING how to stop it altering my formatting? | nerys | Calibre | 0 | 02-28-2010 04:51 PM |