It could be very tedious to create a page list like this, so of course I wrote a script to automate a lot of the heavy lifting. I'm not sure it matters where you put this navigation block in the nav.xhmtl file, but I put mine between the table of contents and the landmarks blocks. This is the kind of page numbering you might need if you created an ebook from a five-page article from an academic journal that appeared in the middle of the volume. Here's a minimal example from my first attempt. This will not be visible to the reader, but it's critical to making everything work. This is simply an ordered list with hyperlinks to every page anchor that you put in your ebook. This is for page 57:įinally you need to put a page list in the new navigation file. This will not be visible to the reader inline. Here's an example of page number anchor, which goes in the main text of the book wherever you want to insert a page number. I have a Blather voice command that triggers a python script to create these things. It wasn't very elegant, but at least it was easy to find where the page breaks were. This could be very tedious if you haven't done any preparatory work, such as putting visible page numbers in plain sight in square brackets the way I did for a couple of ebooks. Next you need to put your page anchors in there. You'll need to edit this new file later to enable the page numbers. This will create the new navigation file nav.xhtml to replace the old toc.ncx file.
When you open up the EPUB for editing, go to the Tools menu and choose Upgrade book internals. The way I did it was to use the ebook editor in a recent version of Calibre. The first thing to do is to upgrade your ebook from EPUB2 to EPUB3. I'm happy to report success, although with some qualifications, which I will get into. Their discussion prompted me to see if I could make it work.
I haven't done that yet, but now that I figured out how to do it on some smaller examples, this is on my to-do list.Īnyway while I was listening to Dave and Andrew talk about this, I thought I remembered reading somewhere that in the newest ePub specification, EPUB 3, there was support for publisher's page numbers to deal with precisely this issue. Those anchors are not quite in the correct format for EPUB, but they are consistent and I will easily be able to write a script to fix them. This was a key part of the source file's infrastructure, which helped me quickly find the passages I was working on in my huge HTML file. In fact, when I was creating the new digital editions of the Counterpoint textbooks like I discussed in hpr1512, I actually took the trouble to put page number anchors through the entire thing, so that at a future date I would be able to enable real page numbers. I've thought about this before but never really gotten into the weeds and figured out how to make it happen. Or, as Andrew and Dave were discussing, you might need to create an index in your ebook that would send your readers back to specific pages like in a paper book. One reason you might want to specify actual page numbers, though, is if you're dealing with a technical or academic book, and you need to be able to refer to specific passages in the book by page number, as you are expected to do in academic research. This is a major accessibility feature of all e-book formats. The whole point of an ebook is that the texts can reflow to fit the page no matter what size the screen is or what font-size you've chosen. Most of the time you don't need to worry about page numbers in ebooks, if you're reading fiction for example. One of the topics they brought up was the thorny issue of page numbers in e-books. This episode is a response to hpr3367 by Andrew Conway and Dave Morriss. Summary: Response to HPR 3367 I describe how to specify page numbers in an EPUB eBook.