Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2011, 05:35 PM   #1
pavelh
Zealot
pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.
 
Posts: 103
Karma: 565178
Join Date: Oct 2009
Device: Kobo Sage, Kobo Clara HD
NCX masters, please check if I am doing it right

Hi and thanks for reading my post!

I am doing my first NCX based on this tutorial. It seems to be working fine but I was hoping someone with more skills could check that my process does not create any possible problems. If there's anyone out there, here it goes:

I feed MobipocketCreator with a html book, which has <h2> headers marking chapters. Then I feed MobipocketCreator's TOC Wizard with h2 in Tag name column and click update to create a TOC. Then I build the book and exit.

And now the parts, that are new to me:
I create the TOC.NCX from a skeleton provided in the tutorial and I use this syntax for navpoints:

<navPoint id="XXX" playOrder="1">
<navLabel><text>YYY</text></navLabel>
<content src="book.html#2HCH0001"/>
</navPoint>


Can I leave the fields XXX and YYY the same for all navpoints? I don't think I have any use for naming them.

Then I proceed to editing the .opf's <manifest> and <spine>

The <manifest> created by MobipocketCreator starts like this:
<manifest>
<item id="item1" media-type="text/x-oeb1-document" href="book.html">
</item>
<item id="toc" media-type="text/x-mbp-manifest-item">
<process plugin-id="toc" id="mbp_toc_intermediary">
<level depth="1" tag="h2">
...etc...


I add one <item> to the beginning like this:
<manifest>
<item id="ncx" media-type="application/x-dtbncx+xml" href="toc.ncx">
</item>
<item id="item1" media-type="text/x-oeb1-document" href="book.html">
</item>
<item id="toc" media-type="text/x-mbp-manifest-item">
<process plugin-id="toc" id="mbp_toc_intermediary">
<level depth="1" tag="h2">
...etc...


Then I change <spine> from this:
<spine>
<itemref idref="toc"/>
<itemref idref="item1"/>
</spine>


To this (exactly like this, does not begin with <spine> anymore):
<spine toc="ncx">
<itemref idref="toc"/>
<itemref idref="item1"/>
</spine>


Then I just run MobipocketCreator again, build the book and it seems to be working fine, giving me the little markers on the progress bar that I wanted. Since I have limited knowledge of HTML I cannot really tell what I am doing at some points. I really don't need too much control, this is just enough for me but I just don't want to create any possible problems that may manifest themselves later. Is there something in my process that is flawed or hypothetically trouble-making, pls?

Many thanks in advance for any kind help!

Best regards,

PH
pavelh is offline   Reply With Quote
Old 03-18-2011, 08:12 PM   #2
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Hi PH

Quote:
Originally Posted by pavelh View Post
<navPoint id="XXX" playOrder="1">
<navLabel><text>YYY</text></navLabel>
<content src="book.html#2HCH0001"/>
</navPoint>


Can I leave the fields XXX and YYY the same for all navpoints? I don't think I have any use for naming them.
The id ("XXX") needs to be unique for each navPoint. However if this is just for your own use, and on the Kindle, you could get away with using the same text ("YYY") for each navLabel. If, though, a future update of the Kindle firmware resulted in it using the NCX file content to generate a TOC (unlikely, I know, given how many Kindle ebooks don't have NCX info coded into them ), you'd have to rework all of your ebooks. Similarly if you ever wanted to convert these MOBI files to EPUB files (e.g. if you got a different ereader), since EPUB readers generally rely on the NCX file to generate a TOC to display to the user. If you use the same text for all of the navLabels, you'd end up with a TOC that had the same text repeated over and over.

Quote:
Originally Posted by pavelh View Post
I add one <item> to the beginning [of the manifest] like this:
<manifest>
<item id="ncx" media-type="application/x-dtbncx+xml" href="toc.ncx">
</item>
...etc...
That looks fine.

Quote:
Originally Posted by pavelh View Post
Then I change <spine> from this:
<spine>
<itemref idref="toc"/>
<itemref idref="item1"/>
</spine>


To this (exactly like this, does not begin with <spine> anymore):
<spine toc="ncx">
<itemref idref="toc"/>
<itemref idref="item1"/>
</spine>
That's fine too. Just a very minor, technical note - it actually does still start with a <spine> tag, just one that has a toc attribute added, which references the id value given to the NCX file in the manifest (highlighted in red).

Apart from the issue highlighted above, I can't see any other potential problems with the process you're using, PH.
DMSmillie is offline   Reply With Quote
Advert
Old 03-18-2011, 08:24 PM   #3
pavelh
Zealot
pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.pavelh ought to be getting tired of karma fortunes by now.
 
Posts: 103
Karma: 565178
Join Date: Oct 2009
Device: Kobo Sage, Kobo Clara HD
Thank you very much for taking your time to go thru all this!
Best regards!
PH
pavelh is offline   Reply With Quote
Old 03-18-2011, 08:29 PM   #4
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
You're welcome.
DMSmillie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Masters of Cover Magic? Eduardito Barnes & Noble NOOK 8 12-17-2010 11:15 AM
Colleen McCulloughs famous Masters of Rome Series shousa Reading Recommendations 31 10-07-2009 01:21 PM
Historical Fiction Altsheler, Joseph A: The Masters of the Peaks. V1. 12 July 2009 crutledge IMP Books 0 07-12-2009 07:11 PM
Science Fiction Smith, E.E. & Evans, E.E.: Masters of Space. v1. 27 Sep 07 HarryT BBeB/LRF Books (offline) 6 09-29-2007 02:58 AM
Science Fiction Smith, E.E. & Evans, E.E.: Masters of Space. v1. 27 Sep 07 HarryT Kindle Books (offline) 0 09-27-2007 04:42 AM


All times are GMT -4. The time now is 01:14 AM.


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