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 12-01-2012, 12:30 PM   #1
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Write .mobi files by hand?

Hi everybody,

So far I've written .epub files myself, with the help of some hand-crafted scripts that digest larger content. That was a good exercise to learn the file format and about eBooks in general. Now I move forward to EPUB3 but that's for another thread.

Given the validated .epub file, I have used kindlegen and Calibre to generate a .mobi file, both of which have produced rather poor results for one book or another.

So I'm at the point where I'd like to build a .mobi book by hand, look through all the files, structure, and the assembling process that delivers the final eBook. And I'm looking for documentation on this. The wiki here seems to contain a lot, but I haven't found an "easing into" sort of thing.

Does anybody have pointers, hints, experiences, etc as to how to go about this?

Thanks!
Jens
_savage is offline   Reply With Quote
Old 12-01-2012, 12:38 PM   #2
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
The wiki is your friend. Use the links to the mobipocket site for documentation on this. You cannot build one directly as it is compiled but you can build a source file and compile it using the mobi compiler called MobiPocket Creator. However, the recommended way is to use ePub and then KindleGen. If you look at the documentation you will notice that pre-KF8 formats from Kindle do not support all the features of ePub so this may be what youi saw in your conversion. You do have to limit the source to what mobi can understand.

Dale
DaleDe is offline   Reply With Quote
Old 12-06-2012, 07:40 PM   #3
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Quote:
Originally Posted by DaleDe View Post
The wiki is your friend. Use the links to the mobipocket site for documentation on this.
Ok, thank you! I'll give the Wiki a spin, and see if I can find what I need. Bottom line is that I need to provide a .epub and a .mobi file for given books, and it seems that converting the .epub into .mobi is not good enough since both formats seem to be somewhat incompatible as far as features and expressiveness are concerned.

Quote:
Originally Posted by DaleDe View Post
You cannot build one directly as it is compiled but you can build a source file and compile it using the mobi compiler called MobiPocket Creator. However, the recommended way is to use ePub and then KindleGen.
That is what I've been doing so far. The .epub files pass epubcheck validation for version 2, and my assumption was that this is good enough to build a fully functioning .mobi file for Kindle from it. I guess that doesn't hold :-)

Quote:
Originally Posted by DaleDe View Post
If you look at the documentation you will notice that pre-KF8 formats from Kindle do not support all the features of ePub so this may be what youi saw in your conversion. You do have to limit the source to what mobi can understand.
Yes, it seems to be that way. Is there a list of compatible features and common denominators across these formats? Something like a "Don't do this in EPUB if you want to generate a MOBI?"

Thanks!
_savage is offline   Reply With Quote
Old 12-06-2012, 08:22 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by _savage View Post
That is what I've been doing so far. The .epub files pass epubcheck validation for version 2, and my assumption was that this is good enough to build a fully functioning .mobi file for Kindle from it. I guess that doesn't hold :-)
There should be no problems with a validated ePub (v2) becoming a fully functioning MOBI file using Kindlegen. Whether or not it will look identical to the original ePub in every way is, of course, another story.
DiapDealer is offline   Reply With Quote
Old 12-06-2012, 08:43 PM   #5
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
Quote:
Originally Posted by _savage View Post


Yes, it seems to be that way. Is there a list of compatible features and common denominators across these formats? Something like a "Don't do this in EPUB if you want to generate a MOBI?"

Thanks!
The MOBI source file format is documented and HarryT has written a great tutorial on how to prepare files for use by Mobipocket Creator. This tool is in the wiki with links to both Harry's tutorial and one that is located on the Mobipocket web site. This will tell you exactly what you need to do to make a .mobi by hand. Note Mobi does not support any CSS at all so the KindleGen program converts some CSS into a form needed my Mobi. The Something like Don't do list changes every time Amazon releases a new KindleGen.

Dale
DaleDe is offline   Reply With Quote
Old 12-07-2012, 01:01 AM   #6
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Quote:
Originally Posted by DiapDealer View Post
There should be no problems with a validated ePub (v2) becoming a fully functioning MOBI file using Kindlegen. Whether or not it will look identical to the original ePub in every way is, of course, another story.
The Wiki had some interesting hints about features that aren't supported in .mobi files, like nested tables. I didn't know that (but didn't use that, either). What happened in my case was that I used kindlegen to build the .mobi file and looking through it on a Kindle worked for about 3 or so pages, and then every following page went black. Kindlegen didn't give me an error, either.

Interestingly (and to my great annoyance, considering my dislike of it) Calibre produced a functioning .mobi file.

I noticed that the look-alike is a whole different issue, yes I wonder if using Pali characters (UTF8 encoded) would be an issue...

Thanks!
_savage is offline   Reply With Quote
Old 12-07-2012, 01:18 AM   #7
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Quote:
Originally Posted by DaleDe View Post
The MOBI source file format is documented and HarryT has written a great tutorial on how to prepare files for use by Mobipocket Creator. This tool is in the wiki with links to both Harry's tutorial and one that is located on the Mobipocket web site. This will tell you exactly what you need to do to make a .mobi by hand. Note Mobi does not support any CSS at all so the KindleGen program converts some CSS into a form needed my Mobi. The Something like Don't do list changes every time Amazon releases a new KindleGen.
Thanks DaleDe! Is this the HarryT tutorial that you're talking about? It seems a little old. I found a few hints regarding what to do here as well.

I didn't know about the lack of CSS support; I just started to read up on the MOBI format. How is it handled then, by using plain HTML attributes, and styling text with
Code:
<i>italic</i>
instead of
Code:
<span style="font-style:italic;">italic</span>
?
_savage is offline   Reply With Quote
Old 12-08-2012, 09:58 AM   #8
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
I think you want to use <em></em> and <strong></strong> for italics and for bolds, because <i> and <b> are deprecated.

But I don't know why. I vaguely remember reading something about why, but I forgot. They make more sense to me than <em> and <strong>.
DSpider is offline   Reply With Quote
Old 12-08-2012, 12:15 PM   #9
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
Quote:
Originally Posted by _savage View Post
Thanks DaleDe! Is this the HarryT tutorial that you're talking about? It seems a little old. I found a few hints regarding what to do here as well.

I didn't know about the lack of CSS support; I just started to read up on the MOBI format. How is it handled then, by using plain HTML attributes, and styling text with
Code:
<i>italic</i>
instead of
Code:
<span style="font-style:italic;">italic</span>
?
Exactly, everything is is the HTML itself like the old days of 3.2. Yes Harry's info is a bit dated but mobi format is also a bit dated. The tutorials on the mobipocket web site are also a bit dated. Amazon has a bit more up to date data on AZW which is mobi plus Amazon DRM but in fact Amazon no longer encourages direct coding but rather conversion of ePub.

Dale
DaleDe is offline   Reply With Quote
Old 12-08-2012, 07:49 PM   #10
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Quote:
Originally Posted by DSpider View Post
I think you want to use <em></em> and <strong></strong> for italics and for bolds, because <i> and <b> are deprecated.

But I don't know why. I vaguely remember reading something about why, but I forgot. They make more sense to me than <em> and <strong>.
Thanks DSpider! I do use <em> quite a bit and style it using CSS, but so far I haven't used <strong> yet. Perhaps I ought to go that way to be able to target both EPUB and MOBI files alike.
_savage is offline   Reply With Quote
Old 12-08-2012, 07:57 PM   #11
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Quote:
Originally Posted by DaleDe View Post
Exactly, everything is is the HTML itself like the old days of 3.2. Yes Harry's info is a bit dated but mobi format is also a bit dated. The tutorials on the mobipocket web site are also a bit dated. Amazon has a bit more up to date data on AZW which is mobi plus Amazon DRM but in fact Amazon no longer encourages direct coding but rather conversion of ePub
Thanks DaleDe! Looking deeper into this gave me exactly that impression Coming from the EPUB side of things I almost feel spoiled by the things I could do, provided the eReaders out there would support EPUB properly. But now, with MOBI in mind, it's even more difficult and constraining to "design" eBooks that actually look like something beyond just flowing text.

It's the browser war all over again

The other day I played with the Mobipocket Creater but that's too much clicking around for my taste; I'm more of a scripting kinda guy. However, I'm beginning to wonder which way to go: kindlegen or Creator? I assume since Amazon is the target market, it's kindlegen?
_savage is offline   Reply With Quote
Old 12-08-2012, 08:05 PM   #12
_savage
Connoisseur
_savage began at the beginning.
 
_savage's Avatar
 
Posts: 53
Karma: 10
Join Date: Jul 2012
Location: Seattle, USA
Device: Nook
Quote:
Originally Posted by DaleDe View Post
Amazon has a bit more up to date data on AZW which is mobi plus Amazon DRM but in fact Amazon no longer encourages direct coding but rather conversion of ePub.
Why not use EPUB in the first place? I guess that's already a long debated issue. Seriously though, providing a less expressive/styleable format as the target of conversion from a more expressive/styleable format is just a disagreeable decision from Amazon's side. It's like castrating a LaTeX document for viewing in a plain-text editor

(I like these smileys here )
_savage is offline   Reply With Quote
Old 12-08-2012, 11:45 PM   #13
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Quote:
Originally Posted by DSpider View Post
I think you want to use <em></em> and <strong></strong> for italics and for bolds, because <i> and <b> are deprecated.

But I don't know why. I vaguely remember reading something about why, but I forgot. They make more sense to me than <em> and <strong>.
I believe we are supposed to use <em> and <strong> because they are semantic markup, whereas <i> and <b> are presentational. We are supposed to use css to describe how we want things presented, and only have the structure put into the text. It's a matter of purity, although how you present italics or bold in a text to speech transcription is an obvious case in point.
pholy is offline   Reply With Quote
Old 12-09-2012, 01:12 AM   #14
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
Quote:
Originally Posted by _savage View Post
Why not use EPUB in the first place? I guess that's already a long debated issue. Seriously though, providing a less expressive/styleable format as the target of conversion from a more expressive/styleable format is just a disagreeable decision from Amazon's side. It's like castrating a LaTeX document for viewing in a plain-text editor

(I like these smileys here )
Smileys are good. At this point Amazon is embracing KF8 which is exactly the same amount of styleable format since it really is ePub source and ePub capabilities but Amazon doesn't want to shoot the goose that laid the golden egg when they have cornered a large share of the market so they retained the compiled idea from Mobipocket and just modernized it by going from OEB to EPub source. Just think of it as compiled ePub with KindleGen as the compiler and everything will be fine.

Dale
DaleDe is offline   Reply With Quote
Old 12-10-2012, 04:07 PM   #15
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
Quote:
Originally Posted by pholy View Post
I believe we are supposed to use <em> and <strong> because they are semantic markup, whereas <i> and <b> are presentational. We are supposed to use css to describe how we want things presented, and only have the structure put into the text. It's a matter of purity, although how you present italics or bold in a text to speech transcription is an obvious case in point.
If text-to-speech readers could interpret <em> and <strong> in a certain way, and not pronounce bold titles or italic chapter numbers in a weird voice, then I guess it makes sense. Yeah... Now that you mention it, I do remember something about semantic markup.
DSpider 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
Do you write your story long hand? Well, here's some useful advice Harper Kingsley Writers' Corner 10 02-19-2012 08:03 AM
I want to merge short mobi book files into a mega mobi file vugtitan Conversion 5 12-25-2011 11:04 AM
Write MetaData changes to book files tbergman Calibre 3 01-03-2011 06:02 PM
can't write more files on sd card? ns66 Sony Reader 12 11-10-2008 02:34 AM


All times are GMT -4. The time now is 12:18 PM.


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