How do you add REAL page numbers to ebook compilations?

Okay, I am on a mission. If anyone out there knows how to add real page numbers to your Scrivener document for publishing kindle and epub files, I would LOVE to know. I’ve searched everywhere in this forum I could, with all the keywords I could think of, and I have of course found nothing.

If this is a remote possibility, I’m all (virtual) ears.

Thanks!
-Scott

I’m not aware of either epub (nook, google e-books, etc…) or kindle formats which use pages in anything like the traditional sense.

Most can read PDF files, which can have page number, but that restricts the user’s ability to enlarge fonts. Is there an underlying need (cross-referencing links, for instance) that you’re trying to solve?

Robert,

Thanks for replying. Take a look at the image below…

If you look closely (this is a Kindle version) you’ll see I am on page 636 of 870. (Order of the Phoenix btw.) So there is some way of making this happen for our own ebooks, whether or not Scrivener has the power/capacity to help make that sort of thing happen for our own exports.

Anyway, I’m determined to figure out how to do this sort of thing myself with my own novel I’m writing, or any further writing projects I do.

Thanks!

But… how? Huh? :open_mouth:

I did some googling to satisfy (or stymie) my own curiosity. I found this, which might be useful: wiki.mobileread.com/wiki/Adobe_D … s#Page-map

Since Scrivener itself doesn’t really understand page numbers (except at compile time), I don’t know if you can have it figure this out on it’s own. But the kindle app should be generating arbitrary page numbers, as described in the link at least.

If you rotate the device to landscape mode do the page numbers change (they do on mine)?

Others who are much smarter than me have said the the page numbers are dynamically generated and are only relevant to the view on the specific device. The “location” number is absolute so you should use that for linking.

Do a search for “epub pages” and I think you’ll find where Ioa (AmberV) has provided what I paraphrase above.

According to the link above, if you don’t provide a page map file (which makes the page number align with another – print – edition), the the page number is based on 1024 unicode characters as the page size.

Jaysen, no it doesn’t change when I rotate it to landscape. So…what I understand you to say is that it’s not reliable if you can, and not possible with Scrivener?

I’m not in need to make links to pages as Scrivener already takes care of the chapters linking from the Contents page. I just wanted to go for that ‘professional’ look if possible. I’d rather not get my ebook created by a professional out there, when Scrivener already does an excellent job of converting to Kindle and epub formats.

Thanks!

Thanks for the link, Robert. I have been paying careful attention to a number of my ebooks on kindle, and this is starting to become more common. I have the new Koontz book Odd Hours and it also does the page numbering thing.

I’m not even remotely capable of doing anything suggested in the link. As tech-savvy as I fancy myself to be, I cannot for the life of me make heads or tales of what was expressed in the link you posted, but I will do more than glance at it soon to be sure I am not second-guessing myself. Again, thanks. :smiley:

Sorry. It might just be the format/method on the books I have. There are folks here that can probably set you straight quickly (RG is one). I’ll leave you in their care.

Thanks, Jaysen. I’ll keep my fingers crossed. I have no idea why I think this is such an important issue, but I can’t ignore it has a greater meaning and value than the alternatives.

It all comes down to anchors. By inserting <a name="page_98"></a> into the html output which is used to generate your ebook, you can say that page 98 starts between the words “You can’t” and “do that!” in the 10th chapter of your text. Then in the page map xml file, you just have to know the name of the html file, and the name of your anchor (page_98) and format it like:
Chapter10.html#page_98, assuming the html file is named “Chapter10.html”.

I assume that the big publisher’s print shops have some scripting that takes the layout files for the print version of the book, and use them to locate the appropriate locations within the epub version, then insert the anchors and add the lines to the page map file. For them, it’s easy/worth the initial development cost & trouble-shooting. For ordinary self-publishers (and even small publishing houses, I’ll bet)… not so much.

With enough technical know-how, you could take the epub output of scrivener, and with a script insert that meta-data into your files by sub-dividing the text into X number of words/characters per page, also taking page breaks into account. Or maybe even manipulate the output of multimarkdown->TXT output so that you can locate those bits of text where each page begins.

While the concept isn’t that big a deal, my head spins at all of the edge-cases in programming something like this. I certainly wouldn’t care to do it myself. shudders It is possible, though. Good luck, and may you come out of this process with your sanity intact!

echoecho.com/htmllinks08.htm

Wow, thanks Robert. Yeah, it makes my head spin, and I would have no idea how to access that level of code for implementaiton without one of those “Ebooks for Dummies” or some such.

I wanted to share yet another image, which isn’t just from the iphone, and is a different book (Kindle) as well, but is running off my desktop (Mac/Lion). If you scroll down you’ll again see I’m on page 153 of 358, and it happens for numbers of other ebooks as I said. I think it’s impressive, but you’re right…I don’t think I’d want to do this myself. Here’s the image:

If only I were a real computer genius with even more time on his hands…Guess I’ll save my investments of time and energy for spinning yarn instead.

I read an interview with Jeff Bezos a few weeks ago. In the course of this interview, Bezos said he was very proud of having added the page numbering to Kindle editions. It seemed to be something of a secret how this was done, and at the time when Amazon announced it, they had a bunch of books done and were adding more.

Now I don’t know how they do it. At the time I assumed they were actually scanning in print editions and adding stuff in-house. But if this is possible with standard anchors in epub, maybe Amazon does it in translating the epub editions of the publishers’ editions. The kindlegen program can accept epub and since Amazon introduced the Kindle FIre and is moving in a big way towards capturing the education ebook market, this sort of thing will become common. In class, it is more important than other venues (outside book reading clubs) for a group of people, some with ebooks, some with hard paper, to be able to say, “Look on page 84 where it says…”

Maybe some day it will also be simple for programs like Scrivener, or the pc kindlegen, to read all this in. But for us indie writers it will always require some manual method of inputting a -pagebreak- code of some sort or another as well as a command to reset the page numbering. The best we can hope for is some WYSIWYG word processor that will pay attention to our page breaks and numbering, and be able to export them in some way to the Kindle or epub format.

I don’t see it being easy for the Scrivener programmers to manage it, though. After all it goes against the very spirit of Scrivener.

Asotir, why do you say it goes against the very spirit of Scrivener? It’s already made numerous things much easier for me as an indie author. I’m curious.

By ‘goes against the spirit of Scrivener,’ I only meant that Scrivener began as IIRC a Mac version of yWriter – you use Scrivener to organize your work, then when the structure is set, you compile or export draft and finish the writing in a word processor.

Scrivener, in spite of all heroic efforts to add word processing made over the past few years by the great programmers, remains a method for organizing and structuring a long work, for organizing research and collections of works. And that’s why in the forum we see the recurring questions about “how do I work with my editor when he needs a Word file, and how do I get his marked-up file back into Scrivener?”

The answer is, we were never supposed to do that and that isn’t the way Scrivener was conceived as working. Only when our editor wanted major structural changes would this have been worthwhile, and in that case the extra effort of importing the file back into Scrivener would be warranted. If the changes are only cosmetic or copy-edits, best to stay in a word processor.

(I hope Keith and the Scrivener team don’t mind me saying all this, and that it still accords with the spirit behind the program.)

I think a more accurate way of putting it is that the programming effort to do this kind of cross-format page layout/typesetting “falls outside the scope of Scrivener’s design”. Because you would have to have extremely fine-tuned control over where pagination, hyphenation, justification, and all sorts of other -ations occurred so that you could just hand one file to a printer, and another to the epub & kindle gen routines. You might not need that, but I guarantee you that such a feature would create a huge demand for people who wanted their ebook pages to line up with their CreateSpace output. Rather than focusing on that end of the spectrum, Keith has wisely concentrated on the composition, planning and editing capabilities that make up the core of Scrivener.

With that said, he might look at the problem, see an easy solution for those who just want automatically generated page numbers, and just do it. Perhaps a post to the wish list, with a link to the article I found might spark a new feature. You never know, because the ways of the Keith are quirky. :slight_smile:

I’ll admit to not having read up on the concept much, but am I the only one that thinks this whole thing is an awful idea? We use page numbers because books have been traditionally a thick sheaf of thin sheets all glued or sewn together, and it makes it easy to go back to where you were, jot down notes for others, formally cite a work, etc. What could possibly be the point of emulating the numbering system, completely divorced from any actual reason for that numbering system? It’s so meaningless, that if I flip through a book on my Kindle, I have to go through multiple screens of text to see a page number change. What’s is the use of that?

All right, so one argument is that it lets you interface with paper book readers. But which ones? The ones who are using the hardback, paperback, edition 23 or edition 5? There is a reason why page numbers have never been a reliable referencing system, and that’s why we mark down the publisher and year when it is important to find the source again. Except, we don’t even get that with Amazon. It’s just a mysterious, awfully vague number that describes an arbitrary non-convenient block of text that may or may not work with your friend’s paper copy.

And meanwhile if you want to get the actual location for a highlight out of your reader, you have to now jump through hoops because of the system preferring the “page” number. Am I also the only one that likes locations? What’s not to like about them? They take you right to where you want to go +/- a few words. You don’t even have to mess around with the clunky old “third sentence in paragraph five on page 231” hack that only works if you both have the exact same edition.

Maybe it’s the implementation that bothers me. I wouldn’t mind if I could ask the reader for the page number for the highlighted phrase in the 2009 Penguin Classics edition. That would be nice and handy, no doubt about it. I have no gripe with that. My gripe is how now my e-book says “Page 325” at the bottom, assuming I want to use this weird irrelevant construct over what has already worked just fine for years now, and that this construct is only relevant to one printed edition in existence, and that edition is undocumented (as far as I know).

I don’t know, I’m not speaking “officially” here as L&L opinion. I’m just reading this thread with a bemused look on my face. Trying to coerce “page numbers” into an e-book feels like driving your car around with a riding crop, to me.

Careful. You may get Vic-k’s attention.

:slight_smile:

Yeah, I see your point. I hadn’t really given it that much thought. :blush: