05-23-2015, 02:04 PM | #16 | |
Grand Sorcerer
Posts: 27,545
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Being able to open an EPUB3 without breaking it is certainly one of the short-term goals of current Sigil development, but it's not ready. |
|
05-23-2015, 02:16 PM | #17 | |
Resident Curmudgeon
Posts: 73,866
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
05-23-2015, 10:11 PM | #18 | |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
|
|
05-24-2015, 04:09 AM | #19 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
And Joshua, of all people, should bloody well know that. Saying "start with the best and work your way down..." (or words to that effect, not a perfect quote) is just...to me, frustrating. ePUB3 isn't necessarily "the best." I for one preferred the NCX over ePUB3 nav, and some other aspects. I think parts of ePUB3 are more-complex than they need be, just for the sake of it. I'll say it again, and you've all heard it from me before: wish the Committee had spent more time focusing on conformance and straightening out those things that could have used clarification, and a lot bloody less on "moving forward for forward's sake," (and media!). A lot of ePUB3 feels foofy, rather than genuine progress in the eBooks themselves. Offered FWIW--just my opinion. Hitch |
|
05-24-2015, 05:29 AM | #20 | |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
|
|
Advert | |
|
05-29-2015, 11:40 PM | #21 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
I do, however, single-source my EPUB content intended for actual EPUB delivery. |
|
05-30-2015, 12:10 AM | #22 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Aren't you just using KF7 fallback, rather than trying to use old HTML to work around that? Hitch |
|
06-04-2015, 12:02 AM | #23 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Here's a list of differences between my Kindle EPUB and my production EPUB:
It is not a small list. For KF8 readers, the EPUB content would probably be survivable, if a little quirky in spots for lack of testing. For KF7 readers, it would basically be a fireball. And as previously noted, several of the KF7 workarounds require tags that would be illegal to ship in an EPUB book, so I can't make the Kindle version be the base version, either. Bear in mind, of course, that my formatting is pretty complex, coming in just shy of 30k in the main CSS file alone. Not everyone will need or want to go quite that nuts. Fortunately, that is all automated. I start out with DocBook XML (with a few custom extensions). So there is a single source for both books (and for my print editions); it is just one level of abstraction farther away from the final content. Last edited by dgatwood; 06-04-2015 at 12:05 AM. |
|
06-04-2015, 11:47 AM | #24 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Interesting list. KindleGen would have fixed some of these issues anyway and some could be done with device specific CSS that KindleGen would have used. However, if you have it all automated there is no reason for you to change. Of course KF7 has no support for CSS at all so some conversions are already happening or are you only supporting KF8?
I do know that some users automatically use a different CSS for Kindle than for regular ePub since it is a simple substitution prior to using KindleGen. Dale Last edited by DaleDe; 06-04-2015 at 11:50 AM. |
06-05-2015, 11:41 PM | #25 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Honestly, if Kindlegen offered a way to provide it separate content for KF7 and KF8, I'd do that in a heartbeat, because I'm pretty sure that a few lines of well-written Perl code would do a better job than Kindlegen. After all, I'm emitting the styles myself in Perl code; it doesn't take much longer to have an "if" statement that causes it to emit tags instead. Of course, if I were producing a general-purpose solution, I'd use a different approach, using a WebKit WebView to render the content, walk the DOM tree, and blow in tags based on the computed styles for each node. It would probably take only double-digit lines of code in total, and it would put Kindlegen to shame by being 100% correct in its interpretation of the CSS every freaking time. Basically, Amazon felt the need to reinvent the wheel, both by creating their own format (KF8) for no good reason and by creating their own tools (kindlegen) for no good reason. And as usual, when reinventing the wheel, they had to make it different, so they made it square.... I just don't get it. But I digress. (*) As of a few months ago |
|
06-06-2015, 06:54 AM | #26 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Trivial CSS -- yes! If only there were a book or a website devoted to Trivial CSS, the way we have the Children's Table at Thanksgiving! I would be happy there.
|
07-31-2015, 12:25 AM | #27 | |||
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
I happened to find this thread on Google when looking for something else...
Quote:
Quote:
Quote:
I'm already doing all of my processing with NodeJS, and the NPM ecosystem is vast, so I easily came across Juice, which is a library originally designed for inlining CSS styles for emails (which can have just as archaic rendering systems as the original Kindles). It worked great (uses another library called Cheerio, which is a browser-less DOM parser and jQuery re-implementation). Anyway, that sounds like more or less what you were talking about with your WebKit WebView and DOM walking. ...Would you recommend doing style inlining for all of my Kindle files? I didn't want to Juice the whole file, because it's going to bloat it with style="..." attributes on practically every tag, but if it's necessary for KF7, I could make it part of my Kindle workflow... |
|||
08-01-2015, 03:48 PM | #28 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Code:
:root[__ibooks_internal_theme*="Night"] * { ... } Code:
element.class element Code:
element.class { ... } Try this: Code:
body element.class, element.class * { ... } Last edited by dgatwood; 08-01-2015 at 03:51 PM. |
|
08-01-2015, 09:17 PM | #29 |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Wow. You just opened my eyes to the concept of CSS specificity. Before today, I'd just had vague ideas about certain rules, that were more specific than others, trumping. Now I actually know what's going on. Thanks VM
It actually totally could have been a specificity issue. I already have Juice working full-on, but it may be worth revisiting that. But then, how about my Kindle question? Worth inlining styles for that purpose, if not for iBooks? |
08-01-2015, 10:05 PM | #30 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Is there an idiot's guide to the specificity rules?? I knew they were out there as well, but don't totally understand them...
|
Thread Tools | Search this Thread |
|
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 |