Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-08-2026, 01:38 PM   #1
Simons Mith
Enthusiast
Simons Mith began at the beginning.
 
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?
Simons Mith is offline   Reply With Quote
Old 11-08-2026, 07:27 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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!!
Turtle91 is offline   Reply With Quote
Old 11-08-2026, 08:20 PM   #3
Simons Mith
Enthusiast
Simons Mith began at the beginning.
 
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.
Simons Mith is offline   Reply With Quote
Old 11-08-2026, 08:33 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is online now   Reply With Quote
Old 11-08-2026, 08:44 PM   #5
Simons Mith
Enthusiast
Simons Mith began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
Quote:
Originally Posted by Turtle91 View Post
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.
This also happens when working with paginated documents. I think people can probably handle it.

Quote:
Then you will find that most publishers will ignore that standard because it just doesn’t matter!!
Like I said, I used to work at a publisher, and the pagination was useful and was used. Presumably Swift ProSys found some use in it, or they wouldn't do it, and I expect their other customers also found it beneficial. It meant if someone reported an error in the print copy you could easily find the same place in the epub, and the other way round was also feasible, if a little bit more of a faff. Anyone producing both a print and an epub of the same title would be likely to hit this use case. I can't imagine my little publisher was remotely special in this regard.
Simons Mith is offline   Reply With Quote
Old 11-08-2026, 08:49 PM   #6
Simons Mith
Enthusiast
Simons Mith began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
Quote:
Originally Posted by KevinH View Post
Hope something here helps.
Yup, thanks for the pointers/reminders. I'd almost forgotten about the nav/ncx stuff.
Simons Mith is offline   Reply With Quote
Old 11-08-2026, 09:31 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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_" />
Conventions can change but since a link to this id will bring you to exactly this point, the N in this case is typically the start of page N (or the end of page N-1).

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.
KevinH is online now   Reply With Quote
Old 11-08-2026, 10:26 PM   #8
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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:
Originally Posted by Simons Mith View Post
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.

...
Oh, I quite agree. I personally have set up a % remaining in chapter, and a % read in book to keep me apprised of my progress when I care enough to look. 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:
Originally Posted by Simons Mith View Post
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.
Sounds like you have an idea that is just as workable as any of those others out there!

Quote:
Originally Posted by Simons Mith View Post
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.
I don't think it is an "aversion" to pagination...it's just a technical roadblock that hasn't been important enough for the smart people to spend their time on - especially when there are more issues that directly effect the quality of the epubs.

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.
Turtle91 is offline   Reply With Quote
Old 11-08-2026, 10:53 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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.
DNSB is offline   Reply With Quote
Reply

Tags
epub, hard copy, index, pagination, pdf


Forum Jump

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


All times are GMT -4. The time now is 05:58 PM.


MobileRead.com is a privately owned, operated and funded community.