View Full Version : observation about ADE page numbers


Abecedary
08-10-2009, 11:09 AM
This might be common knowledge to some of you, but it's something that I recently discovered that I thought was pretty interesting. By using the page-map.xml file, you can control the page numbering scheme in ADE ePubs.

For instance, the book I'm currently reading has ePub page numbers that correspond to the printed version's page numbers (the introduction is numbered with small roman numerals, while the main text uses regular numerals). However, this only applies to the page numbers in the margin--the numbering on the Sony menubar is absolute (cover is page 1, title page is 2, etc). Interestingly, the desktop ADE app actually shows both sets of numbers (both 'paper version' and absolute).

I know many of you despise the margin page numbering, but one place where this could be incredibly useful is in a classroom situation where some students have a paper copy and others have an ebook copy. The teacher need only say "2nd paragraph on page 51" and everyone can easily end up in the same place.

mbagsh55
08-10-2009, 09:24 PM
I agree there are situations where having a predictable page-number that is unaffected by font-size or reading device is useful. However the majority of my reading on the Sony reader is reading fiction for pleasure and I dislike the ADE enforced page numbers on the side of the page and the fact it "messes" up my Sony number bar, giving page numbers like '80-81'.

If this was something that could be toggled on and off in the reader settings it would without question be a feature rather than an irritation. So fingers crossed it appears as an option in the next Sony firmware.

DaleDe
08-11-2009, 12:16 AM
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.

JSWolf
08-11-2009, 10:12 AM
Is there any way to use page-map.xml to not have page numbers on the right side?

AnemicOak
08-11-2009, 10:24 AM
Is 'page-map.xml' normally in an ePub? I've looked at three commercial ePub's and a couple made in Calibre and none of them have it.

Abecedary
08-11-2009, 10:32 AM
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):
<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:
<item href="page-map.xml" id="map" media-type="application/oebps-page-map+xml"/>
gets added to the manifest section, and
<spine page-map="map" toc="ncx">
gets added as the start of the spine.

Abecedary
08-11-2009, 10:35 AM
Is 'page-map.xml' normally in an ePub? I've looked at three commercial ePub's and a couple made in Calibre and none of them have it.

I believe it's another of the Adobe-specific extensions, similar to the page-template.xml file. This is the first commercial ePub I've come across that has one (out of about a dozen or so), but a number of others have the <a id=xxx> anchor points in the html that correspond to the print edition (but they're not referenced or used anywhere that I can find). It looks like this is something that InDesign can do when exporting an ePub file (hence the matchup to the print edition numbering scheme).

I haven't even attempted to untangle a Calibre-generated ePub. The few conversions I've made with it have had multiple stylesheets (some completely blank) and repeated styles (with different names) within the stylesheets. I mean, it does the job (and fairly well at that), but it certainly isn't nice and tidy.

Abecedary
08-11-2009, 10:38 AM
Is there any way to use page-map.xml to not have page numbers on the right side?

I think you know the answer to this. Sorry, Jon.

Jellby
08-11-2009, 10:40 AM
Is there any way to use page-map.xml to not have page numbers on the right side?

According to Abecedary's example, maybe just this?

<page-map xmlns="http://www.idpf.org/2007/opf">
<page name="" href="cover.html"/>
</page-map>

i.e., just set the whole book as a single unnamed page.

Abecedary
08-11-2009, 10:44 AM
Good point, Jellby. I hadn't thought of that.

DaleDe
08-11-2009, 10:48 AM
The new firmware from Hanlin actually uses the page numbers as the only page number indication in the file. A Goto aimed at a page number is the exact page referenced by Adobe. This is unlike the Sony implementation that has screen numbers. However if the Sony firmware is upgraded it may be like this also.

Dale

HarryT
08-11-2009, 10:50 AM
The new firmware from Hanlin actually uses the page numbers as the only page number indication in the file. A Goto aimed at a page number is the exact page referenced by Adobe. This is unlike the Sony implementation that has screen numbers. However if the Sony firmware is upgraded it may be like this also.

Dale

This is also the way it works on the Opus. Without the page numbers you'd have no indication of how far through the book you were.

AnemicOak
08-11-2009, 10:54 AM
Found some info about this here...
http://groups.google.com/group/epubcheck/browse_thread/thread/3da61114e2a831d3


Any way to hide the page numbers appeared in epub output viewed by
adobe digital edition



There is a way but I don't know, if it makes any sense to you.
its as follows:

1. Add page-map attribute in the OPF file.
2. remove the page links from the pagemap.xml file (if exists any), so that
ADE will not find any page numbers to display.
3. Then make an ePub out of it.

But why do you need to hide ADE page numbers?


I've epub file and I want to hide the page number and I didn't
understand your reply, would please to tell me how can I hide it


Please check to my page-template.xpgt and tell me how can I hide page number


Hi,

The page-template file does not control the display of page numbers.
What you're looking for is the page-map.xml file.

Go to http://www.adobe.com/devnet/digitalpublishing/ and download the
"EPUB Best Practices Guide". There's a section on "Adobe Extensions"
which discusses the page map file. To suppress page numbering, you'll
need to create such a file, but use an empty name attribute (note that
I haven't tried this). If the page-map file doesn't exist, ADE will
generate page numbers based on the algorithm discussed in the best
practices guide.

Thanks,

Dave Cramer

Abecedary
08-11-2009, 11:01 AM
Yup. I just tried stripping out the page numbers in the file I have (as per Jellby's comment) and the ADE desktop client didn't display the margin page numbers for those. I didn't go through the whole file, though (there are ~380 pages)--I just did the first 20 or so. However, it looks like it probably will mess with things in other unpredictable ways--mainly the inability to skip to any arbitrary page, or as Harry mentions, even know where in the book flow you are.

DaleDe
08-11-2009, 12:19 PM
I found the answer as to how ADE creates a page number if there is no page file. It uses 1024 unicode characters per page to compute arbitrary page numbers. It will also increment pages based on chapter separations if they start a new file. Looks like I will be building a page document manually for the book "FourFold Gospel" previously uploaded here.

HarryT
08-11-2009, 01:03 PM
Thanks, Dale, that's interesting!

jgray
08-11-2009, 06:48 PM
I found the answer as to how ADE creates a page number if there is no page file. It uses 1024 unicode characters per page to compute arbitrary page numbers.

FBReader does the same thing, although I don't know if the number of characters used is the same.

DaleDe
08-11-2009, 10:15 PM
FBReader does the same thing, although I don't know if the number of characters used is the same.

FBReader uses 2048 I believe.

Dale

jgray
08-12-2009, 02:57 AM
Don't you just love binary? :)

JSWolf
08-12-2009, 06:29 AM
According to Abecedary's example, maybe just this?

<page-map xmlns="http://www.idpf.org/2007/opf">
<page name="" href="cover.html"/>
</page-map>

i.e., just set the whole book as a single unnamed page.
I just tried it. Didn't seem to work.

DaleDe
08-12-2009, 01:43 PM
I have been trying to make my own page-map.xml file and I cannot get it to work. Perhaps there is something else required somewhere or I didn't do it right. I tried to follow the instructions at the top of this thread.

Abecedary
08-12-2009, 02:03 PM
I have been trying to make my own page-map.xml file and I cannot get it to work. Perhaps there is something else required somewhere or I didn't do it right. I tried to follow the instructions at the top of this thread.
Dale, the one thing that it looks like I missed is mentioning this line that gets inserted into the 'manifest' section of the opf file:
<item href="page-map.xml" id="map" media-type="application/oebps-page-map+xml"/>

Try putting that in and see if it helps. It's what defines the 'map' that the spine tries to reference. Otherwise, I can't seem to find anything else in any of the ePub-specific files.

I'll go edit my previous post to include that line.

ahi
08-12-2009, 03:26 PM
.....

DaleDe
08-12-2009, 03:50 PM
Dale, the one thing that it looks like I missed is mentioning this line that gets inserted into the 'manifest' section of the opf file:
<item href="page-map.xml" id="map" media-type="application/oebps-page-map+xml"/>

Try putting that in and see if it helps. It's what defines the 'map' that the spine tries to reference. Otherwise, I can't seem to find anything else in any of the ePub-specific files.

I'll go edit my previous post to include that line.

thanks, it is seeing my map file now but I have some other problems. I built a partial file with just about 50 entries in it. When I do a goto page number the number I enter has to be the line number in the file and not the text number in the file. Perhaps my Hanlin (EZ Reader) does not fully support this feature. I clearly have more work to do to understand this. By the way, the page numbers on the right are gone it would seem and I still have some indication of progress in that I see 8/50 when I press the OK button. The number only increments when I get to the next entry in the file. Very interesting but not what I expected. Lots more investigation needed.

Dale

Abecedary
08-12-2009, 04:20 PM
Hmmm. How's the desktop ADE client handle it? For the one book I have that uses the pagemap, ADE works very close to how the 505 does (not surprisingly). Also, how many characters are there between "pages" in your files? I spot checked in a few of the source files and it looks like Mr Whicher is averaging about 2100 characters per page.

DaleDe
08-13-2009, 12:42 AM
Hmmm. How's the desktop ADE client handle it? For the one book I have that uses the pagemap, ADE works very close to how the 505 does (not surprisingly). Also, how many characters are there between "pages" in your files? I spot checked in a few of the source files and it looks like Mr Whicher is averaging about 2100 characters per page.

the ADE client on the PC is similar to what I see on the EZ Reader. It says that it is on page 8/56 same at my EZ Reader but just beside the display of the x/x number is a box with a page number in it. That page number is the one from the page-map file. so the 8/56 is from the line count of items in the file while the box with the page number is correct. My EZ Reader does not have a specific page number indicator on it.

I have 32 pages defined one page at a time and 7 more prefix pages with roman numerals. So the first page of the real document is the 8 page in the listing hence the 8/56. There rest of the file is only successive sections with one or two entries so they are 40 or so pages apart, varies greatly with the section. The section entries increment the count but the individual pages in the first 32 do not so I have some problem with it finding the corresponding entry in the file I still need to figure out. So it stays on 8 until it gets to 33 and then jumps to 33/56 (which is really page 62 of 760). It that clear as mud? I have a goto page number command on the EZ Reader and it will only go to the sequence numbers for the major sections such as 33 referenced above and will not go to any of the other pages so it can't find the name= or id= statements in the file for some reason. (I tried both name and id to identify the page number and the reference in the page-map file is correct.

As I say I have a hodgepodge and have to do some more investigating to figure it out. However, the page numbers in the right column do not show up, ever.

Dale

HarryT
08-13-2009, 03:27 AM
The "Goto page x" facility on the CyBook Opus definitely uses the ADE marginal page numbers for its "goto". If you goto page 123, it takes you to the page labelled "123" in the margin.

Jellby
08-13-2009, 05:08 AM
The "Goto page x" facility on the CyBook Opus definitely uses the ADE marginal page numbers for its "goto". If you goto page 123, it takes you to the page labelled "123" in the margin.

Hmmm... Does it show non-numeric pages (like xxiii) too? In that case, how are you supposed to jump there?

HarryT
08-13-2009, 05:15 AM
If you can point me to a file which has such a thing, I'll be happy to test it out.

Jellby
08-13-2009, 06:05 AM
Abecedary mentioned it here (http://www.mobileread.com/forums/showpost.php?p=550508&postcount=6).

DaleDe
08-13-2009, 10:24 AM
The "Goto page x" facility on the CyBook Opus definitely uses the ADE marginal page numbers for its "goto". If you goto page 123, it takes you to the page labelled "123" in the margin.

Yes, my EZ Reader seems to do that too in the normal case. How can you know for sure? Did you try a page-map file or a document with a page-map file and then remove a line?

Dale

HarryT
08-13-2009, 10:31 AM
Yes, my EZ Reader seems to do that too in the normal case. How can you know for sure? Did you try a page-map file or a document with a page-map file and then remove a line?

Dale

No, I've just tried it in several of my ePub books, and in all of them, doing "goto page x" takes you to the page numbered "x" in the margin. It's certainly not "physical" pages on the reader, because on the Opus, a single "page number" generally spans about three page turns.

If anyone has an ePub with a page map file, I'll be happy to test it and see what it does on the Opus.

Abecedary
08-13-2009, 10:59 AM
No, I've just tried it in several of my ePub books, and in all of them, doing "goto page x" takes you to the page numbered "x" in the margin. It's certainly not "physical" pages on the reader, because on the Opus, a single "page number" generally spans about three page turns.

If anyone has an ePub with a page map file, I'll be happy to test it and see what it does on the Opus.

Harry, I don't have my reader with me at work today, so I don't have the file near me. As I mentioned before, the only book I've come across that uses the page map is The Suspicions of Mr Whicher, which I purchased from WHSmith. It's an interesting read, and certainly worth the ~6 for it.

Something else to note. I finished the book last night and was pleasantly surprised to find that the full index was linked to the appropriate page numbers in the book. This is another slight advantage to having the ebook page numbers match those of the printed edition--you don't need to redo the entire index. It's a small advantage, and certainly of limited utility, but good to know that it's possible.

frabjous
08-13-2009, 06:14 PM
Hey, it works!

This is unbelievably cool. Do you think there's any chance we can convince kovid or one of the other calibre folks to add support for creating one of these automatically via a kind of structure detection, as with chapters?
:thanks::2thumbsup

Abecedary
08-13-2009, 06:35 PM
Hey, it works!

This is unbelievably cool. Do you think there's any chance we can convince kovid or one of the other calibre folks to add support for creating one of these automatically via a kind of structure detection, as with chapters?
:thanks::2thumbsup

Very doubtful. Kovid is of the mindset that we should eliminate any notion of a "page" (along with typography and basically anything that has its roots in printed media). Nevermind that if we eliminate the concept of a "page" that we'll end up replacing it with some other fairly arbitrary unit of measure (a la "locations" on a Kindle).

frabjous
08-13-2009, 06:47 PM
Not just that... but as you noticed, when people are in a class, or any kind of discussion together, being able to refer to a given page is essential. In the eBook I'm working on, a revised edition of a philosophical classic (I'm an academic) I already had visible markers showing where the original page breaks are -- might as well make them work along with the software pagination.

In any case, so long as ADE is going to add these, we might as well have control over them.

Abecedary
08-13-2009, 06:55 PM
Fully agreed. For a little more effort, you can add something that can make the book quite a bit more useful for certain groups of people. Just seeing you and Dale trying to incorporate this in some way makes me glad I mentioned it. I almost filed it away in my brain as just another one of those "hey, that's pretty cool" observations.

frabjous
08-13-2009, 10:40 PM
I've been playing around with, and am having the same problem with roman numeral page numbers. I don't care so much about not being able to "go to" them, but, on my Sony, they do offset the numbers on the right, and the number shown at the bottom. If there are 7 pages with Roman numerals, if I type in "107" and click the browse button, I end up on page 100: it reads 100 on the right and 107 on the bottom.

Here's a warning from someone claiming that this extension should not be used, and may be deprecated:
http://groups.google.com/group/epubcheck/browse_thread/thread/6d2994b3538ff687

It also, however, adds the tantalizing line, "As noted above, the same page mapping functionality is easily enabled
using the NCX <pageList> element, which is supported in EPUB. And I encourage reading system developers to support it." Anyone know anything about that?

I can attest that trying to play tricks with these things can make the ePub not function properly. I'd say more research is necessary.

Edit: AHA! Check this out:
http://www.epubbooks.com/blog/20081209/marking-up-page-numbers-in-the-epub-ncx/

(Off to try it.)

Edit 2: Oops. I got over-excited there. I missed the part that reads:

I would like to add that although the above method IS valid against the NCX DTD, marking up pages numbers in this way has not yet been officially approved by the IDPF. It must also be noted that there are yet no reading systems that would utilize this information.

Jellby
08-14-2009, 04:50 AM
If there are 7 pages with Roman numerals, if I type in "107" and click the browse button, I end up on page 100: it reads 100 on the right and 107 on the bottom.

That's similar to what Acrobat Reader does with PDFs: it will show "100 (107 of 234)".

HarryT
08-14-2009, 05:04 AM
So if you used a page map to number your pages 2, 4, 6, 8, ..., do you think that the "goto" function would still work as "1, 2, 3, 4, ..."? ie, doing a "goto page 5" would take you to the page labelled "10"?

Jellby
08-14-2009, 07:02 AM
Well, here is a test book (The Picture of Dorian Gray) modified with a simple page-map. I just make each chapter a page, and named them: (empty) the cover, i-iii the title, contents and preface, and 1-20 the chapters. So there are 24 pages; in ADE the Preface is "iii (4/24)" and Chapter 10 is "10 (14/24)" (you can edit the "iii" and the "10").

How does it work in the Opus or in the Sonys?

(By the way, the "page-map" attribute makes the ePUB invalid (http://www.threepress.org/document/epub-validate/).)

Abecedary
08-14-2009, 07:05 AM
I did find an "official" mention of this in the Adobe EPUB Best Practices Guide (http://www.adobe.com/devnet/digitalpublishing/epubs/EPUBBestPractices-1_0_3.epub). It's on page 19 under the Adobe Extensions section (along with info on the Layout Template). I agree that the implementation appears to be somewhat problematic, especially since there's no way to skip directly to a non-numbered page.

HarryT
08-14-2009, 07:13 AM
Well, here is a test book (The Picture of Dorian Gray) modified with a simple page-map. I just make each chapter a page, and named them: (empty) the cover, i-iii the title, contents and preface, and 1-20 the chapters. So there are 24 pages; in ADE the Preface is "iii (4/24)" and Chapter 10 is "10 (14/24)" (you can edit the "iii" and the "10").

How does it work in the Opus or in the Sonys?

(By the way, the "page-map" attribute makes the ePUB invalid (http://www.threepress.org/document/epub-validate/).)

It works as I would have expected - "goto page 4" takes you to the preface, page 5 to chapter 1, etc.

The TOC entries all work fine.

Jellby
08-14-2009, 07:32 AM
It works as I would have expected - "goto page 4" takes you to the preface, page 5 to chapter 1, etc.

And do the page numbers at the margin agree with the page number in the status bar? i.e., Chapter 1 is page 5/24, but it is named "1", you should see a "1" in the right margin, do you see a "1" or a "5" in the status bar?

HarryT
08-14-2009, 07:39 AM
There's a "1" in the margin, but a "5 of 24" on the status bar, so the "goto" is agreeing with the status bar numbers, not the margin numbers.

Jellby
08-14-2009, 07:49 AM
There's a "1" in the margin, but a "5 of 24" on the status bar, so the "goto" is agreeing with the status bar numbers, not the margin numbers.

OK, that's a sensible solution.

WillAdams
08-14-2009, 07:53 AM
FWIW, the old tradition of using roman numerals for frontmatter, then arabic for the balance was done so that new editions of a book could be issued w/o re-numbering the main text block if only a page or two was added to the frontmatter.

While the expense argument doesn't apply to ebooks, having page numbers be invariant between editions does have a certain appeal and could probably be handled better in the reader interface, say have a dialog which pops up when one begins to enter a page number:

FM ____ Text ____ Print edition ____

Where entering a folio in the first field would take one to the roman numeraled frontmatter sections, the middle to the text block, the last could be the pages as they are in the printed edition.

William

frabjous
08-14-2009, 08:17 AM
That's similar to what Acrobat Reader does with PDFs: it will show "100 (107 of 234)".

Sort of. The difference is that the goto box in Acrobat Reader works the other way, which I find preferable. If I enter 107 into the Goto box, I'll end up at "107 (114 of 234)", which is far preferable than ending up at "100 (107 of 234)", which is how it works on my Sony with ePubs like this.

Edit: Ah, I see you've covered this.

Does anyone know offhand what Stanza does with these?

HarryT
08-14-2009, 08:23 AM
Sort of. The difference is that the goto box in Acrobat Reader works the other way, which I find preferable. If I enter 107 into the Goto box, I'll end up at "107 (114 of 234)", which is far preferable than ending up at "100 (107 of 234)", which is how it works on my Sony with ePubs like this.


Does Acrobat Reader allow you to "goto" non-Arabic numerals, then? Eg, could you goto page "iv"?

Jellby
08-14-2009, 08:32 AM
Does Acrobat Reader allow you to "goto" non-Arabic numerals, then? Eg, could you goto page "iv"?

I can't say for sure, but I seem to remember it does. You can also go to page "100 (107 of 234)" by writing the "(107)" inside the parentheses, so you can choose the page by absolute number or by label.

Abecedary
08-14-2009, 08:43 AM
Does Acrobat Reader allow you to "goto" non-Arabic numerals, then? Eg, could you goto page "iv"?

Yes, Acrobat and the desktop ADE client both handle non-Arabic numerals in the same way. If you have the Heroic Measures PDF from the Oprah giveaway from last month, you can see how it works.

DaleDe
08-14-2009, 01:19 PM
Thanks for the Pictures of Dorian Gray book. It is nicely formatted. As to the behavior of my EZ Reader. It displays each number on the upper right corner of the starting page. Since each number is a chapter and starts a new screen that is as it should be. It displays roman numerals and arabic numbers ok. the Cover screen does not display anything.

The page progress display shows x/24 where x is a number from 1 to 24. 1 is the cover page and 2 to 4 are the roman numerals (i to iii). The book proper starts on page 5. The goto command on this unit goes to the progress display numbers. That is, to go to the first page of the book you have to enter 5.

Dale

HarryT
08-15-2009, 01:41 AM
The page progress display shows x/24 where x is a number from 1 to 24. 1 is the cover page and 2 to 4 are the roman numerals (i to iii). The book proper starts on page 5. The goto command on this unit goes to the progress display numbers. That is, to go to the first page of the book you have to enter 5.

Dale

Same as the Opus - as one would expect, since both are using the same ADE reader.

Jellby
08-15-2009, 05:49 AM
Thanks for the Pictures of Dorian Gray book. It is nicely formatted.

I'm glad you liked it, but please download the one in ePUB Books forum, as it has a real title and not these silly pages :)

DaleDe
08-15-2009, 10:38 AM
I'm glad you liked it, but please download the one in ePUB Books forum, as it has a real title and not these silly pages :)

Ah yes, but I appreciate the effort to make the one posted here to illustrate this discussion.

frabjous
08-15-2009, 03:23 PM
Has anyone tried any of the following?

Repeating page numbers/names?
Having them go backwards?
Using words rather than numerals of either sort?
Linking to extra documents not in the manifest or toc?

(For the last couple, I imagine trying to create a kind of ADE ePub "Easter Egg" where the only way to access certain content in the book is to type "xanadu" in the "Go to" box or similar.)

Probably this is all asking for trouble.

My experiments suggest that it's a bad idea to skip certain subdocs from the page-map... I tried to avoid the roman numerals problem just by skipping those pages in the page-map, but on my Sony, it just made the front-matter inaccessible entirely.

wallcraft
08-15-2009, 09:05 PM
Well, here is a test book (The Picture of Dorian Gray) modified with a simple page-map. I just make each chapter a page, and named them: (empty) the cover, i-iii the title, contents and preface, and 1-20 the chapters. So there are 24 pages; in ADE the Preface is "iii (4/24)" and Chapter 10 is "10 (14/24)" (you can edit the "iii" and the "10"). This basic approach, making each chapter (each item in the spine?) a "page" seems to me the best approach for those who want to get rid of the annoying page numbers over text. This is because a page number at the start of a chapter will rarely, if ever, cover up anything important.

If you don't want numbers over text at all, then exactly the same approach with all the names blank does this (see that attached version). On a mobile ADE device, this still allows you to use "goto page 14" to get chapter 10, but under Desktop ADE page numbers are then inactive (the page is always 1/24).

Like frabjous, I tried leaving some entries out of the page-map but this seems to be a bad idea in practice.

In a program like Calibre, it would be possible to produce an explicit synthetic page map that would be more consistent than the one used by Adobe. Adobe bases its synthetic page count on the compressed file size, so pages are not equal size. FBReader, for example, uses a similar scheme but based on uncompressed letter counts. In any case, if Calibre (say) produced a page-map of any kind it could have the option of either including the page number or a blank. In the latter case, the count would still be available to mobile ADE but there would be no page numbers overlaying the text on the screen.

Jellby
08-16-2009, 04:30 AM
Linking to extra documents not in the manifest or toc?

(For the last couple, I imagine trying to create a kind of ADE ePub "Easter Egg" where the only way to access certain content in the book is to type "xanadu" in the "Go to" box or similar.)

Hmm... The ePUB spec says every file should be in the manifest, and all files on an appropriate type (.xhtml) should be in the spine. Your suggestion, however, could be used if a reader supports linear="no" in the spine.

charleski
04-11-2010, 03:16 PM
I think I got possessed by a malignant demon last night, because today I decided to play around with Adobe's page-map extension and discover its undocumented quirks.

I finally found solutions to my problems through intensive experimentation (aka trial-and-error) on version 1.7.2 and am writing them up here since I can find no mention of them elsewhere (probably because people don't use this extension that much).

Failure to obey these rules will lead to premature hair loss and a large dental bill.

1) If a page entry in the page-map file points to the first page in a flow, then the href MUST point to the file itself and NOT to a fragment within it.

Let's say you've been tempted into automating the creation of the page map and have the following entries in your page-map file:

<page name="1" href="content1.xhtml#page1"/>
<page name="2" href="content1.xhtml#page2"/>
<page name="3" href="content1.xhtml#page3"/>
<page name="4" href="content1.xhtml#page4"/>
<page name="5" href="content2.xhtml#page5"/>
<page name="6" href="content2.xhtml#page6"/>
Then ADE will display bizarre behaviour with page numbers appearing out of sequence or doubled-up at the same position even though all the anchors are properly formed and in the right places.

The page-map file should instead look like this:
<page name="1" href="content1.xhtml"/>
<page name="2" href="content1.xhtml#page2"/>
<page name="3" href="content1.xhtml#page3"/>
<page name="4" href="content1.xhtml#page4"/>
<page name="5" href="content2.xhtml"/>
<page name="6" href="content2.xhtml#page6"/>

2) The anchor identifying a page MUST occur in a block that also contains text.

<p class="graphic"><a id="page013"/><img alt="" src="[path]"/></p>
Will result in the page-number not showing in the margin, although it is still reported in the status-bar. Instead, the anchor should be moved to the closest block that contains text (i.e. either the end of the previous paragraph of text or the start of the following one).

pdurrant
04-11-2010, 03:18 PM
2) The anchor identifying a page MUST occur in a block that also contains text.

<p class="graphic"><a id="page013"/><img alt="" src="[path]"/></p>
Will result in the page-number not showing in the margin, although it is still reported in the status-bar. Instead, the anchor should be moved to the closest block that contains text (i.e. either the end of the previous paragraph of text or the start of the following one).

Umm... so by careful use of the page map, we could stop ADE displaying those blasted page numbers? :)

charleski
04-11-2010, 04:15 PM
The thing is that you probably still want page numbers to appear in the status bar. So you'd need to insert anchors in the right places and create a page-map file with entries like<page name=" " href="[fragment]"/>

There might be a way to get ADE to generate the default 1024-character numbering and trick it into not showing, as the first error seems to be related to a clash between generated and specified page numbers and some of my experiments resulted in nothing showing except the first number in a file.

frostschutz
02-08-2012, 12:37 PM
Well, I finally got rid of those blasted numbers on the Story HD by locating the font it used for the numbers (by trial & error replacing all font files with dingbat fonts - on the Story HD it turned out to be a font called Myriad Pro) and then blanking the 0-9 glyphs inside that font itself. The result is that it still THINKS it's rendering and displaying the page numbers but since the modified font causes the number to be rendered as Nothingness of Invisibility, the actual result is no more blasted numbers in the text.

The downside to this is of course that if the same font is used for any other text anywhere, the numbers will be missing there, too. So there may be some collateral damage involved. I tested some documents and couldn't find a case of this happening anywhere though.