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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2010, 05:38 PM   #1
lorddon
Member
lorddon began at the beginning.
 
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:
<pageList id="page-mapping">

<navLabel><text>Paper Edition Page Mapping</text></navLabel>

<pageTarget id="page-iii" value="3" type="front" playOrder="82">
<navLabel><text>Page iii</text></navLabel>
<content src="frontmatter.html#pageiii"/>
</pageTarget>

<!-- ... -->

<pageTarget id="page-105" value="105" type="normal" playOrder="192">
<navLabel><text>Page 105</text></navLabel>
<content src="chap5.html#page105"/>
</pageTarget>

</pageList>
My difficulty now is I don't understand how or where you add the anchors to mark where the pages begin in the xhtml files themselves.
lorddon is offline   Reply With Quote
Old 07-09-2010, 05:44 PM   #2
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
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.
frabjous is offline   Reply With Quote
 
Enthusiast
Old 07-09-2010, 06:35 PM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,188
Karma: 727236
Join Date: Sep 2009
Device: PRS-505
It would be interesting to know if iBooks supports pageList.
charleski is offline   Reply With Quote
Old 07-09-2010, 09:35 PM   #4
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by charleski View Post
It would be interesting to know if iBooks supports pageList.
Apparently they do. This is from page 13 of the iTunesConnect_PublisherUserGuide.pdf :
Quote:
Page Mapping
To provide a reading experience similar to printed books, the person reading a book on the iPad should be able to refer to and navigate to a particular page. This is especially useful in a classroom setting when the teacher instructs the students to go to a particular page in a textbook. An NCX (Naviagtion Control file for XML) file lets the reader jump directly to any of the major structural elements of the document (for example, chapter or section) or to a particular page. To provide navigation to a particular page, use the NCX defined pageList. Below is an example:

<pageList>
<pageTarget id=”p1” type=”normal” value=”1”>
<navLabel><text>1</text></navLabel>
<content src=”content.html#p1”/>
</pageTarget>
<pageTarget id=”p2” type=”normal” value=”2”>
<navLabel><text>2</text></navLabel>
<content src=”content.html#p2”/>
</pageTarget>
</pageList>


Further documentation on the pageList can be found here:
http://www.daisy.org/epub/issues/cla...m-requirements
st_albert is offline   Reply With Quote
Old 07-20-2010, 08:12 AM   #5
CrystalEYE
ePub investigator
CrystalEYE began at the beginning.
 
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>
CrystalEYE is offline   Reply With Quote
Old 07-20-2010, 12:49 PM   #6
soup
Member
soup began at the beginning.
 
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.
soup is offline   Reply With Quote
Old 07-22-2010, 08:59 AM   #7
soup
Member
soup began at the beginning.
 
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.
soup 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
[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


All times are GMT -4. The time now is 08:23 PM.


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