Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-08-2009, 10:54 AM   #1
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Trying to understand re-css-ification.

I've been looking long and hard to find a tool that would trim/clean up my over-abundant css across multiple files, and lo and behold, calibre just does it when making an epub. (thanks kg&team)

But I'm trying to understand some things about what it's doing. Attached are the before (styles.css) and after (stylesheet.css) files

It seems that when I have files that get cut up by Calibre (for chapterization), the <h1> references have been changed to <calibreXX> references:

Quote:
<h1><a name="_Toc246482036"></a><a name="_Toc174706503">12:</a></h1>
becomes

Quote:
<h1 id="calibre_toc_13" class="calibre11"><a name="_Toc246482036"></a><a name="_Toc174706503">12:</a></h1>
And when I look at the epub, the chapter headings aren't calling the right font (seems to be default font calls), despite the setup in the css:

This is eliminated from my css:

Quote:
h1
{mso-style-link:"Heading 1 Char";
margin-top:12.0pt;
margin-right:0in;
margin-bottom:12.0pt;
margin-left:0in;
text-align:left;
page-break-before:always;
page-break-after:avoid;
font-size:18.0pt;
font-family:"Frutiger Linotype","sans-serif";
font-variant:small-caps;
font-weight:bold;}
and is replaced(?) with

Quote:
.calibre11 {
display: block;
font-family: "Frutiger Linotype", sans-serif;
font-size: 1.66667em;
font-variant: small-caps;
font-weight: 700;
margin-bottom: 12pt;
margin-left: 0;
margin-right: 0;
margin-top: 12pt;
mso-style-link: "Heading 1 Char";
page-break-after: avoid;
page-break-before: always;
text-align: left
}

The cut-up chapter file looks fine in a browser, but not in ADE or the Calibre viewer. So what am I seeing here?

-bjc
Attached Files
File Type: zip styles.zip (1.4 KB, 162 views)
File Type: zip stylesheet.zip (1.2 KB, 200 views)
brewt is offline   Reply With Quote
Old 12-08-2009, 11:12 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As far as I can see, the font is the same (apart from sizes). If you don't want the sizes to be changed, you have to disable font size rescaling in the conversion preferences. And note that mso-* properties are not valid css
kovidgoyal is offline   Reply With Quote
Advert
Old 12-08-2009, 11:36 AM   #3
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Well, maybe my ADE is hosed? It looks different there - I haven't got the font embedding down yet - would that account for the difference I'm seeing?
Attached Thumbnails
Click image for larger version

Name:	Clipboard02.jpg
Views:	280
Size:	1.20 MB
ID:	40892  
Attached Files
File Type: epub BasicSet-v5century - Unknown.epub (5.1 KB, 176 views)
File Type: zip BasicSet-v5century - Unknown.zip (5.7 KB, 212 views)
brewt is offline   Reply With Quote
Old 12-08-2009, 11:38 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Definitely looks like a font embedding issue.
kovidgoyal is offline   Reply With Quote
Old 12-08-2009, 11:56 AM   #5
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Ok, I took a couple more swings at this.

V6 was built with Indesign - fonts embedded (only one yet with fonts embedded)
V7 has been cleaned up by dreamweaver, re-epub-ed by Calibre.

The appearance of the various files seem to be rather different between ADE and the Calibre Viewer and the Firefox Viewer (which can't open font-embedded-indesign-built epubs?)

Hmmm.

-bjc
Attached Files
File Type: epub BasicSet-v6century-indesign.epub (526.4 KB, 198 views)
File Type: epub BasicSet-v7century - Unknown.epub (4.7 KB, 191 views)
brewt is offline   Reply With Quote
Advert
Old 12-08-2009, 12:06 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I lack the time to help you debug individual files, hopefully someone who doesn't, will come along.
kovidgoyal is offline   Reply With Quote
Old 12-08-2009, 12:54 PM   #7
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
I guess I'm just trying to understand:

a straight html call to h1 with lots of properties in the css becomes a call to h1 with calibre classes, and the original h1 is eliminated from the css.

Is this to extend compatibility to other viewers?

Thanks for your considerations.

-bjc
brewt is offline   Reply With Quote
Old 12-08-2009, 12:55 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes basically calibre maps all css to classes. This is reduces the amount of css in most casesand is very fast to render on most renderers.
kovidgoyal is offline   Reply With Quote
Old 12-08-2009, 01:51 PM   #9
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Ahh, thank you. Will there be a way to control how it does that (someday)?

Lazybones here is trying to keep from having to re-write my css on either side of the the epub.....

-bjc
brewt is offline   Reply With Quote
Old 12-08-2009, 02:10 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not really, I don't quite see how the process could be customized.
kovidgoyal is offline   Reply With Quote
Old 12-08-2009, 03:27 PM   #11
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
ok, thanks.

btw, finally watched yer video - it was marvy.

-bjc
brewt is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
De-Ligature-ification brewt ePub 32 07-31-2011 04:45 AM
NOW I understand 3dusty General Discussions 10 10-05-2010 04:34 AM
Help me understand this please... abeaty Which one should I buy? 2 09-06-2010 02:52 PM
Need help, don't understand lmarie Fictionwise eBookwise 3 08-05-2008 09:40 PM
Do I understand this correctly? giedre Fictionwise eBookwise 4 01-04-2008 07:46 PM


All times are GMT -4. The time now is 02:37 AM.


MobileRead.com is a privately owned, operated and funded community.