07-09-2010, 05:38 PM | #1 | |
Member
Posts: 13
Karma: 10
Join Date: Jun 2010
Device: Nook Wifi
|
Page Mapping Using toc.ncx
In my brief research I've found that adobe's method of page mapping is non standard and frowned upon by epub checkers. I discovered the preferred method is to use <pageList> under <navMap> in the toc.ncx, as described here.
Quote:
|
|
07-09-2010, 05:44 PM | #2 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
I wouln't bother. Unless someone knows something I don't, or something has changed recently, I'm pretty sure the "preferred" method is not supported by any ePub software.
We've discussed this before. I imagine however, that you're just supposed to use anchor tags. E.g. <a id="page105">first-word-of-page</a> inside chap5.html. Last edited by frabjous; 07-09-2010 at 05:46 PM. |
Advert | |
|
07-09-2010, 06:35 PM | #3 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
It would be interesting to know if iBooks supports pageList.
|
07-09-2010, 09:35 PM | #4 | |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Apparently they do. This is from page 13 of the iTunesConnect_PublisherUserGuide.pdf :
Quote:
|
|
07-20-2010, 08:12 AM | #5 |
ePub investigator
Posts: 7
Karma: 10
Join Date: Feb 2009
Location: Augsburg, Germany
Device: Sony PSR-505, Amazon Kindle 2, Apple iPad, iPhone (iBooks, stanza)
|
As far as I understand, you don`t have to use anchors, but simply ids.
e.g. <p id="page105">First paragraph on page 105 in the printed version</p> |
Advert | |
|
07-20-2010, 12:49 PM | #6 |
Member
Posts: 24
Karma: 10
Join Date: Jul 2010
Device: Kobo
|
I think I found the answer to this the other day, I copy and pasted a line of code I thought would work and it did.
I don't have the code on me right now, but if you find an ePub with a working table of contents, maybe what I can remember off hand might be enough, however I'll post what I use up when I get the chance, I found it works remarkably well. in the book I had with the line of code that worked, the code was around the chapter title, it read something like: "calibre5_calibre3_toc_id1<title_chapter 1>" now I KNOW that isn't the exact code, but it should help you find the right code if you have a book that has a working table of contents, also this was an ePub converted from a PDF using calibre. if you do find the line, the '1' in "toc_id1" can be any number, and only have to be in chronological order, 1, 100, 1000, 10000 will wok just as well as 1, 2, 3, 4 etc. the "chapter 1" part can read as anything you like, it will read on the TOC the same as that line of the page, but the font will be different. you can place them anywhere in the page, it doesn't have to be at the beginning. this worked on my kobo, I don't know what your reader is or if this will work on it, I'm new to this. hope this helps. I should be able to give the exact code in about 10 hours time after this post. Last edited by soup; 07-20-2010 at 12:54 PM. |
07-22-2010, 08:59 AM | #7 |
Member
Posts: 24
Karma: 10
Join Date: Jul 2010
Device: Kobo
|
it took me a little longer to get my hands on it for you, but fially, it's here.
<h1 class="calibre7 calibre3 sgc-1 sgc-8" id="calibre_toc_3">Chapter 1</h1> I just paste that code into any line I want to reference in my table of contents, and it comes up. someone who knows more than me would probably be able to clean in it up for you, and give you a shorter line of code, but it does the job. as I said before, the "3" in " id="calibre_toc_3" " is changable, and provided that the numbers are increasing order, they don't have to be in next number order. the "Chapter 1" can be anything you like, but it will come up on both the line of the page you're referencing aswell as the table of contents, the font will be different on the table of contents. as I said, this is from an epub that was converted from a PDF with calibre, edited with sigil, and worked correctly on the kobo; just a few points of reference for you. |
12-29-2017, 05:31 AM | #8 | |
Nameless Being
|
Quote:
<a id="page014">first word of new page</a> So far that doesn't cause an error. Then I would have to add something like the following in the ncx file: <pageList> ... <pageTarget id=”page014” type=”normal” value=”14”> <navLabel><text>14</text></navLabel> <content src=”Chapter01.xhtml#page014”/> ... </pageList> Will this work? Actually, I'm thinking that I don't need the "<navLabel><text>14</text></navLabel>" part. I'm just using the ncx to guide the creation of the APNX file in Calibre. I don't want the page numbers to show up anywhere in the actual text. Last edited by freewheeling; 12-29-2017 at 05:39 AM. Reason: Clarification |
|
12-29-2017, 07:27 AM | #9 | |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
BTW, a typical pageList should look like this: Code:
<pageList> <navLabel> <text>Pages</text> </navLabel> <pageTarget id="page7" type="normal" value="7"> <navLabel> <text>7</text> </navLabel> <content src="Text/book.xhtml#page7"/> </pageTarget> <pageTarget id="page8" type="normal" value="8"> <navLabel> <text>8</text> </navLabel> <content src="Text/book.xhtml#page8"/> </pageTarget> <pageTarget id="page9" type="normal" value="9"> <navLabel> <text>9</text> </navLabel> <content src="Text/book2.xhtml#page9"/> </pageTarget> </pageList> |
|
12-30-2017, 12:06 AM | #10 |
Nameless Being
|
Doitsu:
I actually tried to use that plugin, and have it installed, but I get an error message. I assumed that if I created the ePub with Sigil 9.9 that it would already be in ePub3 but perhaps I'm wrong and I need to run a conversion program on it. Ahh, never mind. I forgot to change the epub declaration. DUH! Last edited by freewheeling; 12-30-2017 at 12:29 AM. |
12-30-2017, 02:21 AM | #11 | |
Nameless Being
|
The plugin appears to process the first 19 page numbers in the first chapter and then spits out this:
Quote:
|
|
12-30-2017, 02:36 AM | #12 |
Nameless Being
|
I suspect that what's happening is that I'm identifying the first word in the new page, which isn't a number. So I'm back to my previous method.
Update: I changed the targets to the empty first example and the plugin ran perfectly. However, using the APNX output in Calibre to send the book to my Kindle still doesn't produce accurate page numbers. They're clearly not using the PageList for anything. Maybe KindleCreate does. (I can't find a KindleGen, so KindleCreate is probably the latest version of that.) Last edited by freewheeling; 12-30-2017 at 04:00 PM. Reason: Update |
12-30-2017, 02:53 AM | #13 |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Can you please paste the whole error message verbatim? It'd help me to check for this error, which should only be displayed, if the pagelist and/or the page target markers are incorrectly formatted.
|
01-06-2018, 03:34 PM | #14 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I've never heard that the APNX plugin, for Calibre, can be used for anything in commercial production. Now, I could be utterly wrong, as we don't use Calibre for anything like this (we use it for its intended purpose, as a catalog, silly buggers that we are), so I suppose it COULD work, but I'd be very, very surprised, especially as the KDP very notoriously tends to reject most Calibre-made files as "unsupported." Moreover, you cannot upload an AZW to the KDP, so...??? Hitch |
|
01-06-2018, 05:39 PM | #15 |
Grand Sorcerer
Posts: 6,495
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
EPUBs with real page numbers are rare so few tools exist that work with them.
APNX files produced directly by calibre or by using the APNX plugin do not include pages defined in the NCX pageList, they only create approximately positioned pages based on a specified (or estimated) page count for the book. Kindlegen will process a pageList and save it in the MOBI file produced, but I do not know of any software that can split out this information to produce a separate APNX file as needed for Kindle devices. The KFX Output plugin for calibre will make use of an NCX pageList to produce KFX files containing real page numbers that can be sideloaded to Kindle devices. (KFX format does not rely on APNX files.) |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] calibre not creating content.opf or toc.ncx files during conversion | foxxywith2xs | Calibre | 7 | 12-16-2012 07:49 PM |
adding a toc.ncx file to the .prc package | cyberbaffled | Amazon Kindle | 4 | 09-14-2010 02:21 PM |
Can you bypass first two items in TOC.ncx? | sueneu | Kindle Formats | 4 | 07-14-2010 08:36 AM |
toc.ncx playOrder question | aarcane | ePub | 8 | 05-25-2010 05:00 AM |
toc.ncx navpoint content=src empty? | KevinH | Sigil | 6 | 11-23-2009 01:39 PM |