|
|
#1 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
|
Sigil indexing - interaction with pagination
I used to work at a book publisher. We would send the same print-ready pdfs we sent to our printers to an Indian ebook conversion company (Swift ProSys) and they did a cheap and pretty decent job of converting them to epub for us. As a side effect of this conversion, every 60 or so lines in the epub, there would be a convenient <a id="page_xx"></a> tag, which matched the physical pagination of the print edition. This was quite handy for reporting typos and things, even in the epub version.
I assume Swift ProSys' conversion tools did this automatically for them, but IDK the exact implementation details. It's been a few years now. Now as a personal project I have a document whose prime format is epub rather than pdf - the reverse of the above arrangement, but I would still like to produce a paginated pdf and have the pdf page numbers match the 'page numbers' in the epub and/or vice versa. This is especially desirable because the epub has an index, and an index in its current form: ... actions 1, 2 continuous 1, 2 free 1 fumble 1 ... would be pretty much useless for a hard copy printout. Ok, the clickable links do still work in a pdf, but they're not all that great, and in print they're a complete waste of time. Unfortunately, epub has no inherent concept of page numbers. Is there a graceful automated way to insert page numbers into an epub so that this book's index works gracefully in epub (the primary format), and also in a pdf, and also in a hard copy? Can an epub index be taught how to use page numbers in a meaningful way? Does anyone have any advice or suggestions? |
|
|
|
|
|
#2 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,522
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Page numbers for an epub are pretty much irrelevant - except for the case you originally mentioned, comparing with a prime paper copy.
The problem is how do you define a “page” when display sizes, font-sizes, and margin sizes all change based on the users preferences. Some people here have posited the idea of a page being xx number of characters or symbols… but it’s a little confusing on a large display to have multiple pages shown at once, or on a small display you might need to swipe multiple time to make it to the next page. You, of course, could just randomly insert the page id where you feel it best fits…. Also, unfortunately, you will find a few different opinions here - some swear up and down that their way is the only/best way…. But, in the end, they are just opinions until someone in the ePub Standards office decides to publish it. Then you will find that most publishers will ignore that standard because it just doesn’t matter!! |
|
|
|
|
|
#3 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
|
Oh well, if there no consensus I'll do whatever I like. Thanks for letting me know there still isn't anything decided :-)
But to be frank, just because a 'page' isn't especially meaningful for an epub doesn't mean some kind of 'how far you are through the book' indicator isn't useful. And even epubs do give a measure of what percentage of the way through the book you are. But putting a marker every 1%, while it seems like the simplest solution, would have the side effect of normalising every book, regardless of length, at 100 'pages'. As my book comes to about 400 pages in printout form, I'll look at putting markers every 0.25% of the way through. That seems like a reasonable compromise - provided I can determine that info reasonably easily. If anyone has any better suggestions, I'd be willing to try them. I do think the current cultural/technical aversion to paginating things is dumb. And infinitely scrolling web pages are a veritable blight. Page numbers - or some close facsimile thereof - are useful. We should bring them back, or implement something equivalent. |
|
|
|
|
|
#4 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,255
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Please understand. Epubs do support paginated source information in the nav and ncx PageList structures. But those are specifically tied to a single print edition/isbn. And they are only found typically with academic works where citations are meaningful.
Since no official printed version exists in your case, adding end of page/start of next page ids as anchors is entirely up to you. If you use the pdf version with fixed page size, you could paginate the source and use that in the epub so that they match but not visa-versa easily. Hope something here helps. |
|
|
|
|
|
#5 | ||
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
|
Quote:
Quote:
|
||
|
|
|
|
|
#6 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
|
|
|
|
|
|
|
#7 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,255
Karma: 7640672
Join Date: Nov 2009
Device: many
|
If it helps, current accessibility standards in epub3 are typically looking for something like the following as a pagebreak:
Code:
<span id="page_N_" epub:type="pagebreak" role="doc-pagebreak" aria-label="LABEL_FOR_PAGE _N_" /> Once you add these spans to match the pdf pagebreaks, you can use Python Function replace to actually build a list of filenames, and page ids that can then be easily edited to create a PageList for the nav. Alternatively, you could use a word count to space out these pagebreaks but then matching them to a pdf page break will not be easy. Last edited by KevinH; 11-08-2026 at 09:35 PM. |
|
|
|
|
|
#8 | |||
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,522
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
This is usually a function of your reading device rather than the ePub itself. Although the devices might be able to use your id tags if you format them like KevinH mentioned.The issue returns to the "what do you base that percentage on?" number of characters in the chapter/book, file size vs total html population?? There just isn't a concrete answer that doesn't change based on the users setting/display device. I can even get different numbers when I change from portrait to landscape, or continue reading on my desktop or ipad from my phone. The number is really only good during that session, on that device, with those exact settings. Quote:
Quote:
As KevinH mentioned, and you alluded to in your original question, going the other way (from a print book to an ePub) is much more easily doable. If you are super concerned about being able to compare from one to the other, then just create a pdf with standard dimensions (hardback/paperback/tradepub etc.). Then create the page number links based upon the pdf pages. They won't really mean anything more than your random .25% method, but you will have them if anyone asks! I sincerely recommend forwarding any workable solution you come up with to the Powers-That-Be at the ePub Standards Cabal. It would be nice to put this question to rest with a reasonable solution! Last edited by Turtle91; 11-08-2026 at 10:28 PM. |
|||
|
|
|
|
|
#9 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55,940
Karma: 182837452
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I tend to suspect that the suggestion would be to create and use fixed layout ePubs if you want page numbers.
I have been playing with a calibre plugin for generating page numbers. See EPUB3 Page List Generator (Amazon Send to Kindle Compatible) Last edited by DNSB; 11-08-2026 at 10:57 PM. |
|
|
|
![]() |
| Tags |
| epub, hard copy, index, pagination, pdf |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Indexing in SIGIL - How to add "See also..." | roland1 | Sigil | 14 | 01-11-2026 05:18 PM |
| E-paper interaction fiction | PerspexSphinx | General Discussions | 15 | 11-14-2025 09:18 PM |
| Indexing in SIGIL, pt.2 - alphabetical disorder | roland1 | Sigil | 4 | 12-21-2021 08:16 PM |
| Sigil Indexing problem | mjmuk | Sigil | 12 | 02-22-2013 12:50 PM |
| Interaction | umarramzan47 | Introduce Yourself | 2 | 12-11-2011 06:29 PM |