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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 01-06-2009, 09:15 PM   #16
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 622
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by llasram View Post
I might... I was just trying to implement support for this in Calibre's mobi2oeb (which doesn't have it either ) and I realized that I don't have the description of what it's doing quiiiite right. Ugh.
Ah! It's only the 2 (or maybe 3 or 4...?) low bits which are used for the overlap data. Mobigen sets higher bits to mean... er... something else -- and don't I wish I knew what.

Last edited by llasram; 01-06-2009 at 09:18 PM. Reason: Realized need at most 2 bits for UTF-8 overlap.
llasram is offline   Reply With Quote
Old 01-06-2009, 09:41 PM   #17
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Quote:
Originally Posted by pdurrant View Post
The table of contents displays OK in the Cybook, but it's a bit odd to have two links for each chapter - one of the number and one on the title. It would be better, given the navigation limitations to have either one link covering both, or just a link on the title of each chapter.

In addition, the chapter numbers aren't lining up exactly - and some of them have the left side of the first number clipped.
I get the same thing on the EZ Reader (Hanlin V3). The TOC menu item just takes you to the in-lined TOC, and then you follow standard links. With 2 links per TOC entry and the TOC page cuts are not clean. See the 2nd and 3rd attached image (scans of the device). The 1st image shows the cover page, with the bottom obscured by the system footer. This is primarily a limitation of the Hanlin's MOBI image processing, but I think an image smaller than 600x800 would be better (best for the Kindle would be 525x640, although on the Kindle the image is resized automatically). The 4th scan shows the half page left at the start of each Chapter, but the Chapter start looks right.

The last scan is from OpenInkPot (FBReader based), it does not honor the CSS for a chapter start, and the text starts with all caps. In OpenInkPot the TOC works either via following links from the in-lined TOC or by bringing up the TOC menu item and selecting the chapter from a list. This is the same behavior you see with Desktop FBReader.
Attached Thumbnails
Click image for larger version

Name:	EZR_T3M_MR1H.jpg
Views:	111
Size:	42.3 KB
ID:	20700   Click image for larger version

Name:	EZR_T3M_MR2H.jpg
Views:	112
Size:	52.0 KB
ID:	20701   Click image for larger version

Name:	EZR_T3M_MR3H.jpg
Views:	113
Size:	53.8 KB
ID:	20702   Click image for larger version

Name:	EZR_T3M_MR4H.jpg
Views:	111
Size:	38.6 KB
ID:	20703   Click image for larger version

Name:	EZR_T3M_OI4H.jpg
Views:	114
Size:	68.1 KB
ID:	20704  
wallcraft is offline   Reply With Quote
Old 01-06-2009, 09:46 PM   #18
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by kovidgoyal View Post
You shouldn't need to do anything codec related directly. Surely Perl has builtin codecs for coding/decoding UTF-8, etc?
Yes, but the character count is in the raw data and I do not know if there is support for this. I cannot decode it and then count the positions.
tompe is offline   Reply With Quote
Old 01-06-2009, 09:52 PM   #19
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by llasram View Post
Ah! It's only the 2 (or maybe 3 or 4...?) low bits which are used for the overlap data. Mobigen sets higher bits to mean... er... something else -- and don't I wish I knew what.
I am waiting for the description on the Wiki before thinking about supporting this

I thought UTF-8 was standardized and could only be done one way...
tompe is offline   Reply With Quote
Old 01-06-2009, 09:56 PM   #20
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: 25,622
Karma: 4998489
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by tompe View Post
Yes, but the character count is in the raw data and I do not know if there is support for this. I cannot decode it and then count the positions.
You can still do this (albeit rather inefficiently) by converting to whatever universal encoding you use, then iterating character by character and re-encoding each character into utf-8 to see how many bytes it takes.
kovidgoyal is offline   Reply With Quote
Old 01-06-2009, 10:01 PM   #21
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Link÷png, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
How do I create a correct UTF-8 encoded book? Is -unicode to mobigen enough?
tompe is offline   Reply With Quote
Old 01-06-2009, 10:14 PM   #22
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 622
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by wallcraft View Post
The 1st image shows the cover page, with the bottom obscured by the system footer. This is primarily a limitation of the Hanlin's MOBI image processing, but I think an image smaller than 600x800 would be better (best for the Kindle would be 525x640, although on the Kindle the image is resized automatically).
Mobipocket's developer documentation suggested that 600x800 was optimal, but apparently not then...

Quote:
Originally Posted by wallcraft View Post
The 4th scan shows the half page left at the start of each Chapter, but the Chapter start looks right.
That's really weird... The chapter headers are created with a 'height="5em"' attribute, which in Mobipocket speak should produce a top margin of only 5 or so lines (Mobi seems to be quite fuzzy on what an "em" means). Is this happening on the Cybook etc too?

Quote:
Originally Posted by wallcraft View Post
The last scan is from OpenInkPot (FBReader based), it does not honor the CSS for a chapter start, and the text starts with all caps.
Eee -- that bad? There actually isn't any CSS in the mobibook -- just Mobipocket-extended HTML 3.2. If FBReader isn't providing formatting for this then it isn't providing formatting for any HTML content. Nothing at all I can really do there.
llasram is offline   Reply With Quote
Old 01-06-2009, 10:15 PM   #23
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 622
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by tompe View Post
How do I create a correct UTF-8 encoded book? Is -unicode to mobigen enough?
That's what I've been doing, yah. Although you are correct that it seems to be quite, quite rare. I don't have all that many Mobipocket books, but of the ones I do have only one is built that way (one of the most recent Tor freebies).
llasram is offline   Reply With Quote
Old 01-06-2009, 11:18 PM   #24
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by llasram View Post
Actually, I take it back. The Mobiperl 'mobi2html' errors with the Mobipocket book I've generated appear to be errors with Mobiperl's handling of UTF-8 encoded books. With UTF-8 encoding, each text record is followed by 0 or more "overlapping" bytes finishing the current multibyte character, plus an 8-bit integer count of the overlapping bytes as an additional byte. These additional bytes are not counted as part of the content length for the purposes of computing the "filepos" of link targets.
*Thank you* for finally confirming my suspision that the byte count to the filepos/link is "off" in mobi2html (and consequently in Mobi2IMP). I've had to sometimes add upto 200 extra bytes to find the "anchor" tag the filepos was referring to in my conversions from .prc to .imp. I had no idea why I had to do this and never would have thought the UTF-8 decoding could have precipitated this, but it does make awful good sense to me now that you mentioned this!

My Mobi2IMP solution (which was a brute force naive approach) was to scan forward in the uncompressed text (html) from the stated filepos position and look for the first '<' to plop the anchor (for that filepos)! 99% of the times it worked, but it was not elegant nor foolproof!
nrapallo is offline   Reply With Quote
Old 01-06-2009, 11:24 PM   #25
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Quote:
Originally Posted by llasram View Post
Mobipocket's developer documentation suggested that 600x800 was optimal, but apparently not then...
I agree that is what they suggest, but most EInk devices don't use the full screen for a MOBI image. I'm not sure about the Cybook though.

Quote:
Originally Posted by llasram View Post
That's really weird... The chapter headers are created with a 'height="5em"' attribute, which in Mobipocket speak should produce a top margin of only 5 or so lines (Mobi seems to be quite fuzzy on what an "em" means). Is this happening on the Cybook etc too?
I don't have a Cybook, but it is happening on the iLiad, see the attached screen shots. It is treating the space as "ems" (smaller space with a smaller font), and part of the problem may be the very wide line spacing used by the Java MobiPocket Reader. However, it looks like there is extra space over 5em.

Quote:
Originally Posted by llasram View Post
If FBReader isn't providing formatting for this then it isn't providing formatting for any HTML content. Nothing at all I can really do there.
I was not complaining, the only criteria for FBReader is not to cause strange formatting and this is fine.
Attached Thumbnails
Click image for larger version

Name:	iliad_T3M_1.png
Views:	110
Size:	40.5 KB
ID:	20713   Click image for larger version

Name:	iliad_T3M_2.png
Views:	114
Size:	66.8 KB
ID:	20714  
wallcraft is offline   Reply With Quote
Old 01-06-2009, 11:39 PM   #26
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
The TOC does not work on the iLiad. It is possible to call up the TOC, but stylus tapping in the "links" does nothing. In a standard TOC this would take you to the chapter.
wallcraft is offline   Reply With Quote
Old 01-06-2009, 11:47 PM   #27
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by wallcraft View Post
The TOC does not work on the iLiad. It is possible to call up the TOC, but stylus tapping in the "links" does nothing. In a standard TOC this would take you to the chapter.
Then, is there something wrong with the original .html source or llasram's conversion to .mobi?

@llasram

Can you post your original .html source file used to create this .mobi ebook in post #1? This way we can verify which is the culprit...
nrapallo is offline   Reply With Quote
Old 01-07-2009, 12:07 AM   #28
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 622
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by nrapallo View Post
Then, is there something wrong with the original .html source or llasram's conversion to .mobi?
It's definitely my generation code. It may be because the links are in a table? But I'm ditching the CSS-table-as-Mobi-table conversion anyway.

Quote:
Originally Posted by nrapallo View Post
Can you post your original .html source file used to create this .mobi ebook in post #1?
Sure -- it's my EPUB edition of the The Three Musketeers.
llasram is offline   Reply With Quote
Old 01-07-2009, 03:49 AM   #29
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,183
Karma: 86241230
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
The Cybook displays Mobipocket covers at full screen (so 600x800 is good for the covers on a CyBook), but not in-line images. I don't know what the optimum size is for in-line images on a CyBook, and I suspect it could change with new firmware.

Quote:
Originally Posted by wallcraft View Post
I agree that is what they suggest, but most EInk devices don't use the full screen for a MOBI image. I'm not sure about the Cybook though.
pdurrant is offline   Reply With Quote
Old 01-07-2009, 04:29 AM   #30
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: 6,049
Karma: 4347035
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by pdurrant View Post
The Cybook displays Mobipocket covers at full screen (so 600x800 is good for the covers on a CyBook), but not in-line images. I don't know what the optimum size is for in-line images on a CyBook, and I suspect it could change with new firmware.
I hope new firmwares (or OpenInkpot) will allow to change the margin size and even open an in-line image in full screen. In the meantime, the cybook resizes an image if it's too large, so it's not that bad to have 600x800 in-line images. The usable text block is around 500x650, I'd say...
Jellby 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
LRF output kovidgoyal Calibre 873 04-06-2010 02:32 PM
Trying to get consistent look to all output daveps Calibre 0 03-08-2010 02:18 PM
Best Output for Kindle 2 brewjono Calibre 4 01-28-2010 08:55 PM
PRC output Nate the great Calibre 6 10-17-2009 12:58 AM
One last oeb2mobi test... llasram Kindle Formats 13 01-15-2009 11:20 AM


All times are GMT -4. The time now is 08:35 PM.


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