Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-27-2015, 02:49 AM   #46
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by dgatwood View Post
Very possible. Have you tried looking at the stylesheets inside the app?

Control-click on the app bundle and choose "Show Package Contents". Then go to Contents, PlugIns, then control-click on BKAssetEpub.bundle, choose "Show Package Contents", then Contents, Resources, and open the various .css.tmpl files.
You two are SO cute. ;-)
Hitch
Hitch is offline   Reply With Quote
Old 08-27-2015, 06:32 PM   #47
mattmc
Connoisseur
mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.
 
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
Quote:
Originally Posted by Hitch View Post
You two are SO cute. ;-)
Hitch


Should add a new smilie, Hackers At Work, or something.

Quote:
Originally Posted by dgatwood View Post
Very possible. Have you tried looking at the stylesheets inside the app?

Control-click on the app bundle and choose "Show Package Contents". Then go to Contents, PlugIns, then control-click on BKAssetEpub.bundle, choose "Show Package Contents", then Contents, Resources, and open the various .css.tmpl files.
Wow, thanks! I didn't even think of that.

...Interesting, looks like they use Handlebars to auto-generate portions of their CSS, based on what fonts are available, if the language is Japanese (vertical), etc.

Heh. Some of the stuff in here is gold:

Code:
.calibre > div, .calibre1 > div {
  position: static !important;
}
...

/* fix documents that abuse inline-block */
...


/* centering hack to support Calibre-generated vertical centered documents */
...

/* Hide soundtrack <audio> tags from ever showing up */
/* display: none; doesn't seem to actually work for some reason, so hide it another way */
...
Interesting, the impact Calibre has had, even on the supposedly aloof citadels of Apple. Reminds me of a story I once read about graphics card driver programmers and game programmers, always writing code to try to compensate for one anothers' software. So you have the eBook conversion software and the eBook display software, and the developers writing code to compensate for each others' bugs and quirks.

Here's the CSS that hides the <aside> of your footnotes:

Code:
aside[epub|type~="footnote"] {
  display: none !important;
}
Aha! I found the footnote itself:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions">
    <head>
        <title>Footnote</title>
        <style type="text/css">
@namespace ibooks "http://apple.com/ibooks/html-extensions";
            
body > div:first-child {
    font-size: 200%%;
}
body > div:first-child[ibooks|footnoteTitleEnhance="on"] {
    font-size: 300%%;
    line-height: 0;
}
            
body > div:first-child[ibooks|footnoteTitleEnhance="on"] > span {
    vertical-align: text-bottom;
}
        </style>
    </head>
    <body>
        <div><span><BKASIDETITLEGOESHERE/></span></div>
        <div>
            <BKASIDEHTMLGOESHERE/>
        </div>
    </body>
</html>
So, it looks like when the popover is generated, it is populated with this footnote.xhtml file, which obviously doesn't pull in any of your CSS. I mean, unless they read your files for <style> tags in your <head> and pull those in--but per evidence to hand, they don't.

So yeah, looks like inlining stuff is the way to go here.

Note: This is OSX iBooks, so maybe iOS iBooks works differently, but I kinda doubt it.
mattmc is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB to HTLM (single page) obihal Conversion 8 05-20-2014 01:45 PM
Online HTML book -> epub: TOC from single file dancal Conversion 0 01-27-2014 01:45 PM
EPUB Formatting Challenge: Embedding blog posts in the flow of story text Morganucopia ePub 18 08-02-2013 04:47 PM
Several xhtml/html to a single epub file help. clowe1028 ePub 3 03-21-2010 03:47 AM
single HTML to ePub with fixed width font skyfish Calibre 8 12-10-2009 01:30 PM


All times are GMT -4. The time now is 12:05 AM.


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