View Single Post
Old 08-11-2009, 10:32 AM   #6
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Quote:
Originally Posted by DaleDe View Post
I would also like to know how ADE computes these numbers. I have an eBook that has lots of internal reference to page numbers and I would like to make them accurate.
I'm not entirely certain how it calculates page numbers by default, but I seem to remember seeing it mentioned that ADE puts a page number in for every x characters or bytes or something.

As for the page-map.xml file, it's pretty straightforward. The file for the book that I have is simply as follows (btw, the book is The Suspicions of Mr Whicher):
Code:
<page-map xmlns="http://www.idpf.org/2007/opf">
<page name="" href="cover.html"/>
<page name="i" href="halftitle.html"/>
<page name="ii" href="other.html"/>
<page name="iii" href="title.html"/>
<page name="iv" href="copyright.html"/>
...
<page name="1" href="part1.html"/>
<page name="3" href="chapter1.html"/>
<page name="4" href="chapter1.html#page_4"/>
<page name="5" href="chapter1.html#page_5"/>
<page name="6" href="chapter1.html#page_6"/>
<page name="7" href="chapter1.html#page_7"/>
...
</page-map>
You'll notice the cover doesn't get a page number, and page 2 (the blank verso page) has been omitted. If the html file is just a single page, it gets referenced as is. For multiple pages (as in chapter 1), you just drop an anchor tag into the correct place in the html text flow (<a id="page_4"/>).

The only other things that I can see that are needed are adding the following to the opf file:
Code:
<item href="page-map.xml" id="map" media-type="application/oebps-page-map+xml"/>
gets added to the manifest section, and
Code:
<spine page-map="map" toc="ncx">
gets added as the start of the spine.

Last edited by Abecedary; 08-12-2009 at 02:08 PM. Reason: added line for the manifest
Abecedary is offline   Reply With Quote