View Single Post
Old 02-20-2017, 11:44 AM   #37
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by BetterRed View Post
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.

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.
Very interessant, as usual! I read several times, still there are ambiguities. Understanding right it would be advisable to involve sigil for converting books. My OS is Linux Xubuntu, so Word (Microsoft) is not available for me.

In order to get my CSS clearer I name them somehow 'appropriately', e.g. <p class="no_h4_ital"> for something what looks like header, but doesn't function as one.

Click image for larger version

Name:	no_h4_ital.png
Views:	296
Size:	62.0 KB
ID:	155152
<p class="no_h4_ital">

Quote:
As a bonus the underlying tool (Mammoth converter) marks italicised text with <em> instead of <i> etc.
Why you speak of a bonus here? You know, <em> and <i> is semantically something slightly different. I wouldn't like to get all my <i> changed to <em>.

Some funny details!
Spoiler:
I have always propagated this, in mobileread and elsewhere: to add pictures and/or examples. Visual impressions and genuine "Aha-effects" definitely support the successful and enjoyable learning.

Demo: ... and it was the highlight of his press conference when, after all sorts of alternative facts, he got carried away to the announcement rumours saying he is the <em>first</em> US President and simultaneously a Nobel laureate in philosophy in spe.

On request: Yes, he got informed!

The journalists were nevertheless speechless. One of the press representatives sighed quite dismayed: <em>WOW!</em>

Last edited by chaot; 02-20-2017 at 12:53 PM. Reason: semantically→appropriately
chaot is offline   Reply With Quote