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 06-07-2009, 01:44 AM   #1
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
The Art of War--problems with ePub, LRF, and Mobi

Greetings!

I would like some wise recommendations as to how to fix up the attached ePub, LRF, and Mobi files so they will be as professional as their respective format's limitations allow.

The Mobi one seems to be the best quality of the lot--I suspect even without help I could tweak it into shape somehow. Though help would certainly be welcome.

One thing all three formats deal poorly with are my two "faked" ordered list items. The Art of War--or, at least, this translation of it--has two list items that are labelled "5, 6." and "13, 14." respectively. HTML has no support for such arbitrary numbering (i.e.: two numbers for the label of a single list item) of <LI> unless one uses an image (which, I imagine, is as wrong as it is inelegant a solution).

For your convenience, I also include the source HTML file (i.e.: taowde_for_epub.zip) wherefrom I converted to ePub, and subsequently to the LRF and Mobipocket formats.

As inelegant as my "faked" list items are... thus far I have been only able to think of even more inelegant/stupid/manually-intensive solutions that I'd like to avoid (i.e.: give up using ordered lists, and use tables with invisible borders and manually entered numbers for the "list" labels).

The ePub would have been second-best, was it not for the fact that it literally lets some text run off the visible page, beyond the margins... for no valid reason that I can tell. (i.e.: it's not a PRE encased section)

It, unfortunately, also seems to have no concept of small capitals (or at least does not use them when an EM tag with a specific class attribute mandates that it do so).

There are, I think, also other minor formatting snafus.

The LRF is messed up here and there and everywhere... but at least, unlike the ePub, does not seem to render any portion of the book literally unreadable.

----------

To be clear, I am asking for suggestions that would put me on the right track quicker and will result in the files improving in ways that might not occur to a beginner like me. I don't necessarily need too much hand-holding or verbatim instructions, as I am reasonably handy.

I will be very curious to see whether either of these three can reasonably approach the quality of the custom-sized PDFs... the mobi file seems most likely so far, from a Sony PRS-505 perspective at least.

Thanks in advance!

- Ahi
Attached Files
File Type: epub The Art of War - Sun Tzu.epub (84.7 KB, 372 views)
File Type: lrf The Art of War - Sun Tzu.lrf (156.0 KB, 191 views)
File Type: mobi The Art of War - Sun Tzu.mobi (195.5 KB, 421 views)
File Type: zip taowde_for_epub.zip (27.0 KB, 207 views)
ahi is offline   Reply With Quote
Old 06-07-2009, 04:43 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,971
Karma: 4346919
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by ahi View Post
One thing all three formats deal poorly with are my two "faked" ordered list items. The Art of War--or, at least, this translation of it--has two list items that are labelled "5, 6." and "13, 14." respectively. HTML has no support for such arbitrary numbering (i.e.: two numbers for the label of a single list item) of <LI> unless one uses an image (which, I imagine, is as wrong as it is inelegant a solution).
I'd suggest dropping the lists altogether and using CSS-tables instead.

Quote:
As inelegant as my "faked" list items are... thus far I have been only able to think of even more inelegant/stupid/manually-intensive solutions that I'd like to avoid (i.e.: give up using ordered lists, and use tables with invisible borders and manually entered numbers for the "list" labels).
Since the numbering is fixed already (you are not going to move the items up and down), the manual numbers in tables is not so bad, but cumbersome.

Quote:
The ePub would have been second-best, was it not for the fact that it literally lets some text run off the visible page, beyond the margins... for no valid reason that I can tell. (i.e.: it's not a PRE encased section)

It, unfortunately, also seems to have no concept of small capitals (or at least does not use them when an EM tag with a specific class attribute mandates that it do so).
This didn't happen for me, I guess you are seeing bugs/glitches of ADE and not limitations of the ePUB format. The lack of support for small caps is certainly and ADE thing.

In the toc.ncx files the titles seem wrong, for instance, one can see:

X. Terrain Sun Tzu said: We may…

shouldn't it be just "X. Terrain"?
Jellby is online now   Reply With Quote
 
Enthusiast
Old 06-07-2009, 04:58 AM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,551
Karma: 40125051
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Tables are certainly a good solution for things like this. I've used them in a number of my books.
HarryT is online now   Reply With Quote
Old 06-07-2009, 09:44 AM   #4
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Thanks for the explanation, Jellby and HarryT.

I'll try tables instead of the DIV/CSS fakery I've got presently going. Is Mobipocket and LRF as readily editable (via some trickery) as ePub's HTML files?

- Ahi
ahi is offline   Reply With Quote
Old 06-07-2009, 09:57 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,551
Karma: 40125051
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Mobi can be "expanded" to HTML, but you don't get your "original" HTML back - Mobi Creator "re-writes" it.

LRF cannot, to the best of my knowledge, be easily "decompiled".
HarryT is online now   Reply With Quote
Old 06-07-2009, 10:31 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,132
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by HarryT View Post
Mobi can be "expanded" to HTML, but you don't get your "original" HTML back - Mobi Creator "re-writes" it.

LRF cannot, to the best of my knowledge, be easily "decompiled".
LRF2LRS and then LRS2LRF
JSWolf is offline   Reply With Quote
Old 06-07-2009, 11:40 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,971
Karma: 4346919
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by ahi View Post
I'll try tables instead of the DIV/CSS fakery I've got presently going.
Note that when I said CSS-tables, I meant using the "display: table-*" properties of CSS, that would make it look like a table while not explicitly marking it up as a table. The advantage is maybe not clear, but I feel the code would look more friendly that way.
Jellby is online now   Reply With Quote
Old 06-07-2009, 01:13 PM   #8
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Here's the painfully manually constructed ePub. My appreciation for the format is definitely not growing the more I work with it.

It now looks pretty good, but it's still cutting off text for me on my Sony PRS-505 in Chapter 1, quote 13.

Even though the fault is without a doubt in the rendering engine, if I cannot fix that, the ePub (of this book) is not exactly professionally viable. I could still make it available for free download, with a notice... but it's not something that could be sold, seeing as how it is guaranteed to be broken for a sizeable subset of purchasers.

Any ideas what I could try? I still see no reason/cause/justification in the HTML for the renderer not to simply do a line-break instead of running words off the page... so don't really know where to go from here.

I'm guessing though, Jellby, that it should be pretty close to perfect on your Cybook.

Of course, for some reason this far cleaner and better looking ePub converts considerably worse into LRF and Mobipocket format.

- Ahi
Attached Files
File Type: epub taowde.epub (126.1 KB, 193 views)
File Type: lrf The Art of War - Sun Tzu.lrf (186.6 KB, 185 views)
File Type: mobi The Art of War - Sun Tzu.mobi (213.5 KB, 204 views)
ahi is offline   Reply With Quote
Old 06-07-2009, 01:30 PM   #9
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,971
Karma: 4346919
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by ahi View Post
It now looks pretty good, but it's still cutting off text for me on my Sony PRS-505 in Chapter 1, quote 13.
[...]
Any ideas what I could try? I still see no reason/cause/justification in the HTML for the renderer not to simply do a line-break instead of running words off the page... so don't really know where to go from here.
I don't see why it should, either. Have you tried in ADE?

But the .epub does not validate in http://www.threepress.org/document/epub-validate. It uses <center>, mimetype is not the first file in the archive, uses entities in the ncx file, etc.

(In chapter 1, point 4, (2) is missing)

Quote:
I'm guessing though, Jellby, that it should be pretty close to perfect on your Cybook.
I doubt it, my Cybook does not read ePUBs (yet ? )

I see you are using an independent table for each point (although the first 4 points use a normal list)... I'd say a single table for the whole chapter is better, for the layout, at least. Also, inline "style=..." are not recommended, use classes instead.

Oh, and the epub has all those chapter*.xhtml~ files (backups from vim, I guess).

Last edited by Jellby; 06-07-2009 at 01:33 PM.
Jellby is online now   Reply With Quote
Old 06-07-2009, 01:37 PM   #10
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Thanks for the tips, Jellby. I'll play around a bit more...

Mobipocket is a bit better when generated via mobigen.exe (see attached).

- Ahi
Attached Files
File Type: mobi taowde.mobi (93.0 KB, 194 views)
ahi is offline   Reply With Quote
Old 06-07-2009, 01:39 PM   #11
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
How do I make the mimtype file the "first" in the archive?!

- Ahi
ahi is offline   Reply With Quote
Old 06-07-2009, 01:42 PM   #12
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,971
Karma: 4346919
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by ahi View Post
How do I make the mimtype file the "first" in the archive?!
What I do is:

#create MyBook.epub only with "mimetype", without compression (as per spec)
zip -X0 MyBook.epub mimetype

#add the rest of the files with maximum compression
zip -X9Dr MyBook.epub META-INF OEBPS
Jellby is online now   Reply With Quote
Old 06-07-2009, 01:44 PM   #13
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by Jellby View Post
What I do is:

#create MyBook.epub only with "mimetype", without compression (as per spec)
zip -X0 MyBook.epub mimetype

#add the rest of the files with maximum compression
zip -X9Dr MyBook.epub META-INF OEBPS
if you don't want to use the commande line, you can also just create an empty zip archive, and put the mimetype in there alone as the first file (no compression). then add all the others afterward. that is what i do.

(or just create a zip of the mimetype, and add the other files in a second operation).
zelda_pinwheel is offline   Reply With Quote
Old 06-07-2009, 01:52 PM   #14
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Thanks. Here's the valid ePub.

- Ahi
Attached Files
File Type: epub taowde.epub (82.8 KB, 113 views)
ahi is offline   Reply With Quote
Old 06-07-2009, 01:58 PM   #15
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,792
Karma: 507333
Join Date: May 2009
Device: none
Making it a valid ePub seemed to have adversely affected its display on my Sony Reader... sigh. The text still cuts off just fine though. =)

By trying it in ADE, did you mean Adobe's free downloadable software?

- Ahi
ahi 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
Problems converting LRF to EPUB rbur Calibre 2 06-21-2010 06:28 PM
Problems with LRF from converted epub ficbot Calibre 4 12-16-2009 03:12 PM
PDF -> LRF, ePUB, MOBI? krischik Calibre 12 07-23-2009 11:37 PM
Epub to LRF no problem, Epub to Mobi indexerror Rogier Calibre 3 06-09-2009 11:42 AM
Converting PDF to ePub/MOBI/LRF jasonb57 Workshop 0 02-16-2009 03:58 PM


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


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