How do you add REAL page numbers to ebook compilations?

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Fri Aug 10, 2012 7:12 pm Post

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
"It aint why, it just is." -Van Morrison

User avatar
robertdguthrie
Posts: 3075
Joined: Mon Nov 09, 2009 10:06 pm
Platform: Mac
Location: St. Louis, MO, USA
Contact:

Fri Aug 10, 2012 7:38 pm Post

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?
Often wrong, rarely in doubt.
Time for a change... I'm now rdale; same dog-avatar, same dog... channel?

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Fri Aug 10, 2012 7:44 pm Post

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!
Attachments
photo-1.jpg
Harry Potter image example
photo-1.jpg (92.23 KiB) Viewed 1474 times
"It aint why, it just is." -Van Morrison

User avatar
robertdguthrie
Posts: 3075
Joined: Mon Nov 09, 2009 10:06 pm
Platform: Mac
Location: St. Louis, MO, USA
Contact:

Fri Aug 10, 2012 7:55 pm Post

But... how? Huh? :shock:

I did some googling to satisfy (or stymie) my own curiosity. I found this, which might be useful: http://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.
Often wrong, rarely in doubt.
Time for a change... I'm now rdale; same dog-avatar, same dog... channel?

User avatar
Jaysen
Posts: 6227
Joined: Mon Dec 17, 2007 4:00 am
Platform: Mac + Windows
Location: East-Be-Jesus-Nowhere SC, USA

Fri Aug 10, 2012 7:56 pm Post

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.
Jaysen

I have a wife and 2 kids that I can only attribute to a wiggle, a giggle, and the realization that she was out of my league so I might as well be happy with her as a friend. 26 years marriage later, I can't imagine life without her. -Me 10/7/09

ImageImage

User avatar
robertdguthrie
Posts: 3075
Joined: Mon Nov 09, 2009 10:06 pm
Platform: Mac
Location: St. Louis, MO, USA
Contact:

Fri Aug 10, 2012 8:00 pm Post

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.
Often wrong, rarely in doubt.
Time for a change... I'm now rdale; same dog-avatar, same dog... channel?

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Fri Aug 10, 2012 8:03 pm Post

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


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!
"It aint why, it just is." -Van Morrison

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Fri Aug 10, 2012 8:09 pm Post

robertdguthrie wrote:But... how? Huh? :shock:

I did some googling to satisfy (or stymie) my own curiosity. I found this, which might be useful: http://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.


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. :D
"It aint why, it just is." -Van Morrison

User avatar
Jaysen
Posts: 6227
Joined: Mon Dec 17, 2007 4:00 am
Platform: Mac + Windows
Location: East-Be-Jesus-Nowhere SC, USA

Fri Aug 10, 2012 8:26 pm Post

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


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!

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.
Jaysen

I have a wife and 2 kids that I can only attribute to a wiggle, a giggle, and the realization that she was out of my league so I might as well be happy with her as a friend. 26 years marriage later, I can't imagine life without her. -Me 10/7/09

ImageImage

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Fri Aug 10, 2012 8:27 pm Post

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 aint why, it just is." -Van Morrison

User avatar
robertdguthrie
Posts: 3075
Joined: Mon Nov 09, 2009 10:06 pm
Platform: Mac
Location: St. Louis, MO, USA
Contact:

Fri Aug 10, 2012 8:33 pm Post

It all comes down to anchors. By inserting

Code: Select all

<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!

http://www.echoecho.com/htmllinks08.htm
Often wrong, rarely in doubt.
Time for a change... I'm now rdale; same dog-avatar, same dog... channel?

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Fri Aug 10, 2012 8:41 pm Post

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:

koontz.png
koontz.png (110.83 KiB) Viewed 1464 times



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.
"It aint why, it just is." -Van Morrison

as
asotir
Posts: 190
Joined: Sun Jun 24, 2012 10:38 pm
Platform: Mac

Sat Aug 11, 2012 12:38 pm Post

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.

User avatar
scottmarmorstein
Posts: 18
Joined: Sat Apr 28, 2012 10:54 pm
Platform: Mac
Location: PA
Contact:

Sat Aug 11, 2012 12:48 pm Post

asotir wrote: 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.
"It aint why, it just is." -Van Morrison

as
asotir
Posts: 190
Joined: Sun Jun 24, 2012 10:38 pm
Platform: Mac

Sat Aug 11, 2012 1:33 pm Post

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.)