Quote:
Originally Posted by Turtle91
I cringe every time I see how bloated with calibre classes some books get. Most of them are unnecessary.
|
Quote:
Originally Posted by chaot
I also think so. What do you do about it?
|
I mainly convert to EPUB from DOCX. In some cases I convert from PDF to DOCX and then to EPUB. I have lots of 'tools' in Word, some are my own, others are from 3rd party sources, and I've used some of them for decades.
Until the advent of the calibre editor I converted my DOCX's to EPUB via calibre's conversion facility. However when the calibre editor's ability to Import DOCXs was introduced (without CSS flattening that happens in calibre conversions) I switched using it. I tried several other conversion tools (not the online ones, I do too many to consider using them) and found them unsuitable for my purposes.
I have used Word Styles religiously since they were first introduced last century - e.g. I never format paragraphs individually. An exception is italicising words or phrases. Consequently I never got boatloads of CSS entries, even when I was calibre converting ex Word RTFs to EPUBs I didn't get a lot of the cruft some complain about.
Occasionally I would 'rename' the 'blockN' and 'calibreN' CSS entries to have names similar to the Style names in the Word Template, so 'block4' might become 'first_para'.
But more recently I have switched to using the Sigil DOCXImport plugin, this has a facility that allows me to create and store mappings between a Word Template file to an EPUB CSS file. This means I get close to a one for one mapping between Word's Styles and the stylesheet entries with similar names. As a bonus the underlying tool (Mammoth converter) marks italicised text with <em> instead of <i> etc.
So how do I avoid the calibre generated CSS entries - mainly by using Word as a word processor rather than a typewriter, and secondly by not using calibre as my final DOCX->EPUB conversion tool.
I sometimes do 'interim' conversions to get a feel for what the EPUB will look like, or to do multilingual spell checking, or to look at a Calibre or Sigil report - for this I use calibre's conversion facility, pressing 'C' and 'Shift+V' is too easy. I rarely look at the EPUB code at this stage.
BR