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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2010, 05:41 PM   #1
slugs
Junior Member
slugs began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Arrow Authoring Kindle eBooks with chapter markers

Hey guys,

Just got my kindle 3 in the mail (early even), and I'm pretty excited. I've been getting familiar with the tools (calibre, sigil, etc)..

I've put together some books (epub) from scratch in sigil, then I've run them through calibre to convert them to mobi. However, I can't get the chapter indicators to show up on the bottom progress bar on the kindle while reading.

Also, is there a more direct way to author mobi files or am I doing it right?

Please advise.
slugs is offline   Reply With Quote
Old 09-17-2010, 06:19 PM   #2
JeremyR
Guru
JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.
 
JeremyR's Avatar
 
Posts: 973
Karma: 2458402
Join Date: Aug 2010
Location: St. Louis
Device: Kindle Keyboard, Nook HD+
Are you breaking up the chapters into separate files (within Sigil)? (You hit CTRL-Enter after a chapter ends)

I think that's the key to getting the chapter marks when they convert. At least that's what I do and I get those marks.
JeremyR is offline   Reply With Quote
Old 09-17-2010, 06:31 PM   #3
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
The key is to have a fully-filled out NCX file properly referenced in the OPF. Without that, there can be no chapter marks, which you can direct at various points within a single file, if you prefer, rather than splitting your chapters up into separate files.

The more direct way is to do your markup/assembly by hand/with text editor and command-line tools. As far as the NCX goes, this can be kind of tedious, but I like to fine tune mine, so I have a cut and paste template which I fill out) or with whatever suitable ePub-creating tool you like.

One warning: if you create nested navpoints, only the first level of them will seem to show up on the Kindle, but the rest will apparently be there, but inaccessible until you navigate to where one of them should be, and then flick the controller back and forth. They'll still be invisible though, which can be very frustrating.

Hope this helps, and welcome to MobileRead!

Last edited by ATDrake; 09-17-2010 at 06:49 PM. Reason: Needz moar welcome message.
ATDrake is offline   Reply With Quote
Old 09-17-2010, 07:53 PM   #4
slugs
Junior Member
slugs began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by JeremyR View Post
Are you breaking up the chapters into separate files (within Sigil)? (You hit CTRL-Enter after a chapter ends)

I think that's the key to getting the chapter marks when they convert. At least that's what I do and I get those marks.
That's exactly what I thought the problem was when I had it as one big file, so I did this and while I greatly improved the formatting there are still no marks.


Quote:
Originally Posted by ATDrake View Post
The key is to have a fully-filled out NCX file properly referenced in the OPF. Without that, there can be no chapter marks, which you can direct at various points within a single file, if you prefer, rather than splitting your chapters up into separate files.

The more direct way is to do your markup/assembly by hand/with text editor and command-line tools. As far as the NCX goes, this can be kind of tedious, but I like to fine tune mine, so I have a cut and paste template which I fill out) or with whatever suitable ePub-creating tool you like.

One warning: if you create nested navpoints, only the first level of them will seem to show up on the Kindle, but the rest will apparently be there, but inaccessible until you navigate to where one of them should be, and then flick the controller back and forth. They'll still be invisible though, which can be very frustrating.

Hope this helps, and welcome to MobileRead!
Wow, thanks for your answer! Seeing as how I'm a cherry I'm going to have to read a LOT more to figure out what you just said.
This is definitely what I've been looking for.. What epub creating tool do you use?

Thanks for the welcome, it's nice to find some fellow literate people out here


Quote:
Originally Posted by PhillipA82 View Post
Congrats on your new Kindle!
Thanks! I hope I continue being this motivated to read. Being able to travel with books is key
slugs is offline   Reply With Quote
Old 09-17-2010, 08:34 PM   #5
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Quote:
Originally Posted by slugs View Post
What epub creating tool do you use?
I'm actually one of those text editor/command-line people and a Mac user besides, so you might not find my usual toolset all that helpful.

But if you want to make a quickie NCX, just shove a few id="yourlinkhere" attributes into each and every <h1>, <div>, <p> or whatever other tag you want to have a link to, and then cut and paste the following to a new file, filling in the [] bits as appropriate.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<ncx version="2005-1" xmlns="http://www.daisy.org/z3986/2005/ncx">
<head>
<meta name="dtb:uid" content="[use same as unique-identifier="" from OPF]" />
<meta name="dtb:depth" content="1" />
<meta name="dtb:totalPageCount" content="0" />
<meta name="dtb:maxPageNumber" content="0" />
	</head>
<docTitle>
	<text>[Book Name]</text>
	</docTitle>
<docAuthor>
	<text>[Book Author]</text>
	</docAuthor>
<navMap>
<navPoint id="[yourlinkhere]" playOrder="[number in order]">
	<navLabel><text>[Chapter X Section Y]</text></navLabel>
	<content src="[name of file].html#[yourlinkhere]" />
	</navPoint>

	</navMap>
	</ncx>
You'll need to enter a navPoint for every chapter mark you want (I keep some snippets in Smultron, my usual text editor, which will let me select text and autofill in the blanks and position the cursor conveniently afterwards using a shortcut key).

If you've split into multiple files, you don't need to bother adding the id="" to the text or using the .html#yourlinkhere unless you want internal subsections or the like.

Just go directly to the files as src="chapter01.html" and everything will take care of itself. Kindlegen will even start fresh chapters on new pages instead of running the text on from the previous.

When you're done, add the following to the OPF if it doesn't already exist:

<item id="ncx" media-type="application/x-dtbncx+xml" href="toc.ncx" />

under the "manifest" element and

<spine toc="ncx">

You can call the "ncx" to anything you like, as long as you give the item id="" and toc="" the exact same name.

After that, you should be good to go once you've zipped up the ePub or converted straight to Mobi from the OPF, whichever you prefer.
ATDrake is offline   Reply With Quote
Old 09-17-2010, 08:42 PM   #6
slugs
Junior Member
slugs began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Thanks again for your help ATDrake!

Your post was very helpful as I completely screwed up my header id's, once I cleaned them up it worked great. That was a pretty quick/straightforward fix. Retested and works great now!
slugs is offline   Reply With Quote
Old 09-17-2010, 08:48 PM   #7
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Glad to hear it worked out! Nicest thing about e-books is the way they can be customized just the way you like them.
ATDrake is offline   Reply With Quote
Old 09-17-2010, 11:15 PM   #8
JeremyR
Guru
JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.
 
JeremyR's Avatar
 
Posts: 973
Karma: 2458402
Join Date: Aug 2010
Location: St. Louis
Device: Kindle Keyboard, Nook HD+
Are you making a TOC in Sigil? I've been going from text files as my source, so I just also highlight the first line of each chapter and making it the heading (the dropdown box on the top left).

That and splitting up the chapters is all I do out of the ordinary, and as I've said, all my books have had those chapter marks.
JeremyR is offline   Reply With Quote
Old 01-27-2011, 12:02 PM   #9
mknepper
Junior Member
mknepper began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Device: none
Hi, I know this thread has been inactive for awhile, but hopefully someone will see this and be able to help. I'm trying to build mobi/prc files from epubs and consistently get the error message: "Hyperlink not resolved in tocblah blah blah)" I'm using an NCX file, and I've noticed that this error always seems to occur when attempting to make a nested TOC using anchors... the error occurs at the first sign of an anchor using #.
Example: <content src="Chapter1.xhtml#section1"/>
This corresponds to a paragraph in the file "Chapter1.xhtml" that has the id tag, that is: <p id="section1">Text text text</p>.
I've looked around a bunch of threads here and elsewhere and haven't been able to find a solution... can anyone help?
(Note: I am sometimes, though not always, able to convert these epubs to mobi format using kindlegen, but I need to use mobipocket creator to add DRM.)
mknepper is offline   Reply With Quote
Old 01-27-2011, 12:25 PM   #10
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
Maybe the tool(s) you are using expect the older format of tag, using <a name="section1"> instead of a tag with the id attribute (<p id="section1">)?
susan_cassidy is offline   Reply With Quote
Old 01-27-2011, 01:01 PM   #11
chyron8472
Groupie
chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.
 
chyron8472's Avatar
 
Posts: 180
Karma: 558490
Join Date: Jan 2011
Device: Kindle 5, Amazon Fire 5th Gen, Moto Z Play Droid
I have bought more than one ebook for my Kindle from Amazon that didn't come with chapter markers, as well it didn't have an NCX file (and sometimes didn't even have a Table of Contents). God knows why someone would publish said books without these things. =\

But anyways, I've learned how to get Calibre to create decent chapter markers for said books. Different books have different problems, but I've found that, for the most part, the following works:

(In the convert settings for the book)

change the "Detect Chapters at" field at the top of the Structure Detection section to:
//*[((name()='h1' or name()='h2' or name()='h3') and re:test(., 'chapter|book|section|part|prologue|epilogue\s+', 'i')) or @class = 'chapter']
(most of it is default, but I add the bolded part)

Check the box for "Force use of auto-generated Table of Contents" in the Table of Contents section

For books that have a TOC but no chapter markers, a good thing to do is to:
Check the box for "Do not add Table of Contents to book" under MOBI output (or w/e output you use) if the book already has a working TOC, so that it will add chapter markers in places where the generated TOC would link them, but linking to the TOC from the menu takes you to the original TOC at the front of the book instead having created a new one in the back.



With Star Trek: New Frontier, which contains the first 4 books of the series in one volume (and which came with no chapter marks, no table of contents, and an NCX file which was in a tree format which didn't seem to work at all,) I basically did this while leaving the "Do not add Table of Contents to book" unchecked in the MOBI Output section, since there was no TOC in the first place. The formatting of the chapters is really weird for this book, but what Calibre did for it was certainly tolerable.


Now, in the case of my copy of the 50th anniversary The Lord of the Rings (one volume containing all 3 books,) the only chapter markers that existed pointed to the start of each book (ie. there were only 3 chapter markers, period.) When I used the above method, Calibre added chapter markers for each entry in the existing TOC itself, made a pagebreak between each, and detected the actual chapter headings and their subheadings as seperate chapter breaks. So I had to change the dropbox labeled "Chapter Mark" in Structure Detection to none, and put the word Chapter in the "TOC Filter" box in Table of Contents (because it also detected the chapter headings and subheadings as different chapters.) I did check the "Do not add Table of Contents to book" in the MOBI Output section, since a TOC came with the book and did work. This all sounds sloppy, but it works rather well.

Last edited by chyron8472; 01-27-2011 at 01:13 PM.
chyron8472 is offline   Reply With Quote
Old 01-27-2011, 03:59 PM   #12
mknepper
Junior Member
mknepper began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Device: none
Susan, I've been able to use Mobipocket Creator to convert some epubs that use the id attribute rather than the old <a> tag, so I don't think that's the problem here. However, your comment got me thinking in this direction: I've only looked at a limited sample size so far (4-5 of each), but I noticed that the epubs I have been able to convert to a DRM'd mobi consist of htm or html files, while those that have NOT been able to convert consist of xhtml files. Again, I've only looked at a few, but I'm wondering... does Mobipocket Creator have some sort of problem with xhtml (files)? Does it require all the content files to be htm(l)? I find it hard to believe that none of the epubs I've converted to DRM'd mobi so far have been built of xhtml files, but I suppose it is possible. Can anyone confirm Mobipocket Creator's compatibility with xhtml?
mknepper is offline   Reply With Quote
Old 01-27-2011, 08:06 PM   #13
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Quote:
Originally Posted by mknepper View Post
I'm trying to build mobi/prc files from epubs and consistently get the error message: "Hyperlink not resolved in tocblah blah blah)" I'm using an NCX file, and I've noticed that this error always seems to occur when attempting to make a nested TOC using anchors... the error occurs at the first sign of an anchor using #.
Sounds like you may be running into the same problem that this guy did. Apparently Mobipocket Creator handles certain things in the same way as older versions of KindleGen.

Though it's always possible MBPC is choking on the XHTML, as you hypothesized. I don't think it's been updated in years, and possibly either the filetype declaration in the OPF or the <empty-tag /> structure or maybe the DOCTYPE declaration if exists is something it refuses to parse.

Hope this helps, and welcome to MobileRead!

Quote:
Originally Posted by chyron8472 View Post
I have bought more than one ebook for my Kindle from Amazon that didn't come with chapter markers, as well it didn't have an NCX file (and sometimes didn't even have a Table of Contents). God knows why someone would publish said books without these things. =\
Sometimes they've attached things wrongly in the source (KindleGen is really picky about this), and the resulting Mobi gets converted without these niceties and no one bothers to check.

I've seen it happen with freebie books that were available at multiple outlets, where the ePub version had a proper TOC and NCX and showed chapter marks once converted, whereas the AZW from Amazon didn't.

Quote:
Originally Posted by chyron8472 View Post
With Star Trek: New Frontier, which contains the first 4 books of the series in one volume (and which came with no chapter marks, no table of contents, and an NCX file which was in a tree format which didn't seem to work at all,)
The Kindle can actually support multi-level NCX, but it does it in an invisible way. Only the top level shows as dots in the location bar.

To navigate to the sub-levels (which are invisible, but exist), you have to first navigate to a top level dot (say, "Part I"), page forward until you reach the start of a second-level location (a chapter or individual poem) and then you can flick back and forth between the chapters at that level.

Amazon should include on the actual Kindle something like they have in the Kindle Previewer app, where you click a button and you can see and navigate through the entire nested NCX structure at once.
ATDrake is offline   Reply With Quote
Old 01-27-2011, 08:38 PM   #14
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)
I've got a feeling this has something to do with the EPUB file containing multiple XHTML files, and the same "id" value being used in more than one XHTML file. When compiled into a MOBI file, the content is rolled up into a single file, but I've got a notion the "id" values used in links like these ones in your NCX file remain unchanged. So if you have a "section1" bookmark in both "chap01.xhtml" and "chap02.xhtml", when converting to MOBI using MobiPocket Creator, I think you end up with the problem of multiple occurrences of the same bookmark name.

If I'm right, and this is what is causing the problem, you need to go through the EPUB and change these bookmark names so that they are unique without relying on being in different files (so the example given might become "chap01sect1"), and change all references that point to each bookmark (such as references in the NCX file, OPF file and inline TOC).
DMSmillie is offline   Reply With Quote
Old 01-27-2011, 08:43 PM   #15
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)
Just a quick follow-up to clarify something there:

Inside the MOBI file itself, links to named locations in the file are converted to numerical byte locations within the file. However the id (bookmark) value is used by prcgen in the process of generating the MOBI file from the source files.
DMSmillie 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
Kindle Chapter Markers penguintri Amazon Kindle 7 09-13-2010 01:47 PM
inline page markers overtop of text?? Stinger Kobo Reader 9 05-28-2010 05:42 PM
Ebooks battle for next chapter Moejoe News 13 04-26-2009 09:18 AM
guardian.co.uk:Ebooks battle for next chapter Kris777 News 1 04-26-2009 01:29 AM


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


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