Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2013, 06:57 PM   #1
storax
Member
storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.
 
storax's Avatar
 
Posts: 19
Karma: 3328
Join Date: Jun 2013
Location: Sandpoint, Idaho, USA
Device: Kindle Paperwhite
One File to Rule Them All ?

Hello everyone,

I’m making my first eBook as a favor for the author, an old friend. I understand HTML and CSS and can use RegEx. The code is clean, but not vanilla, and both the HTML and CSS validate. My workflow is

HTML => Sigil => ePub => KindleGen => mobi

The author’s formatting requests seem reasonable ― some type of first-line styling, some type of section-break decoration, and one small graphic in two places ― so I had thought it would be fairly easy to make a single HTML/CSS source that would create a valid ePub that in turn could be fed to KindleGen to produce old- and new-format Kindle files with the same overall appearance.

That seems to have been a bit naïve.

Everything I try seems to work on one reader but not on another. I’d been thinking I could still use one HTML/CSS source because
  1. ADE will ignore ‘@media amzn-mobi' and '@media amzn-kf8' code in the CSS, and
  2. ‘display: none;’ will work on all devices. (Is this actually true?)
For the section breaks, for example, I might end up with 3 DIVs stacked one on top of the other, two of them always turned off with ‘display: none;’ and ‘@media amzn-’ queries flipping the switches.

But after a weekend of head-scratching I’m tending to think I’d be better off to simply
  1. make an ePub that looks the way the author wants and validates,
  2. then edit a copy of the HTML/CSS from the first ePub to make a second ePub,
  3. and use the second ePub as input for KingleGen.

Nonetheless, part of me shudders at the thought of forking my source documents. I used to develop commercial software and recall the endless hours of entertainment a simple fork could provide. Hence my quest for the ‘One File to Rule Them All’.

But perhaps a two-source workflow would really be better for an eBook: at least I’d know that a fix for a change in KF8 rendering wouldn’t affect ADE readers, and if typos need to be fixed it’s still only two files.

Still though, I’d like to learn to do this right: not just ‘the book looks okay’, but something approaching ‘best practice’.

What sayeth those who’ve done this many times?
storax is offline   Reply With Quote
Old 08-14-2013, 01:17 AM   #2
DSpider
Evangelist
DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.
 
DSpider's Avatar
 
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
Keep your HTML clean (i.e. without anything specific to ADE or Mobi/KF8) and you should be fine.
DSpider is offline   Reply With Quote
Advert
Old 08-14-2013, 06:21 PM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by storax View Post
[*] ADE will ignore ‘@media amzn-mobi' and '@media amzn-kf8' code in the CSS, and[*] ‘display: none;’ will work on all devices.
BTW, you can hide content that ADE doesn't support using a dummy XPGT file. For more information, see this post by Jellby.

For a real life example, have a look at the attached excerpt from a German MR book with Arabic text. (The Arabic text is included twice, once as regular Unicode characters with vowel signs wrapped in noade spans and once as mirrored pre-shaped Unicode characters wrapped in ade spans for ADE.)
I also included an amzn-mobi media query in the CSS that'll hide the Arabic text completely in the Mobi7 part of the master .mobi file. As it's designed now, it can be used with both ADE and KindleGen. ADE will display the text wrapped in the ade spans, KF8 enabled devices/apps (and non-ADE epub readers) will display the text wrapped in noade spans and non-KF8 Kindles will display neither text wrapped in ade nor noade spans.

BTW, epubcheck 3.0.1 will display an error message if you validate epubs with xpgt files in them, however, this is a known epubcheck bug.
Attached Files
File Type: epub ADE_RTL_TEST.epub (365.8 KB, 221 views)
Doitsu is offline   Reply With Quote
Old 08-14-2013, 08:12 PM   #4
storax
Member
storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.storax could sell banana peel slippers to a Deveel.
 
storax's Avatar
 
Posts: 19
Karma: 3328
Join Date: Jun 2013
Location: Sandpoint, Idaho, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by Doitsu View Post
BTW, you can hide content that ADE doesn't support using a dummy XPGT file. For more information, see this post by Jellby.

For a real life example, have a look at the attached excerpt from a German MR book with Arabic text.
Thank you for the tip, Doitsu !

That's very interesting indeed. I looked at your example and it opens up some interesting possibilities, that's for sure.

I need to do some testing.

Unfortunately, 'real work' is calling at the moment. It may be a few days before I try it out. Having the idea rattling around in my subconscious will probably mature my thinking, though.

Thanks again for your help.
storax is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
One device to rule them all? flips01 Onyx Boox 0 12-31-2012 08:55 AM
One device to rule them all BeccaPrice General Discussions 95 08-17-2012 06:15 AM
The 5 finger rule. AlexGrama General Discussions 73 02-26-2012 05:19 AM
ID: Rule Above and Below dezignlady ePub 5 07-12-2011 11:40 PM
Will One Device Rule Them All... Or Not thymaster General Discussions 65 11-23-2010 01:19 PM


All times are GMT -4. The time now is 09:47 AM.


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