View Single Post
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