Skip to content

Stable page numbers 2#14473

Merged
hius07 merged 12 commits into
koreader:masterfrom
hius07:stable-pages-2
Oct 20, 2025
Merged

Stable page numbers 2#14473
hius07 merged 12 commits into
koreader:masterfrom
hius07:stable-pages-2

Conversation

@hius07

@hius07 hius07 commented Oct 17, 2025

Copy link
Copy Markdown
Member
  1. Optional 'publisher info' message for new books. Closes Completely disable stable page numbers #14467.
  2. Default "Show stable page numbers in margin" is off.
  3. Book info: show publisher pages info.
1

This change is Reviewable

@hius07 hius07 changed the title Stable pages 2 Stable page numbers 2 Oct 17, 2025
Comment on lines 85 to 86
and G_reader_settings:isTrue("pagemap_notify_document_provided")
and not (self.use_page_labels or self.show_page_labels) then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that it's optionnal and default to off, may be remove that not (use or show) condition ? (So one can see the source when he is using them).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would require the cancel_callback, to disable use (and show?).

@poire-z poire-z Oct 17, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be just some informative InfoMessage, no need to have any question when invoked from Book information. Wrong comment :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, in this case show InfoMessage instead of ConfirmBox.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with an InfoMessage (no risk to hit the wrong button :))
(The menu says "notify me", not "ask me if I want to use them" :))

end
end
end
table.insert(kv_pairs, { self.prop_text["pages"], pages or n_a, separator = true })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No callback to see the source ? (Just asking, not requesting.)
Given that the last_page, as on your screenshot with a scrambled book, can look odd or be confusing without more context, if tapping on it could explain it, it would be self documenting.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same infomessage?

UIManager:show(InfoMessage:new{
text = T(_("Source (print edition) of publisher page numbers:\n\n%1"),
self.ui.document:getPageMapSource()),
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be with a bit more blahblah:

This book has publisher page numbers (first_label) > last_label) from the source (print edition):

page_map_source

end,
},
{
text = _("Notify if book has publisher page numbers"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Frenzie @Commodore64user : does it read ok "Notify..." without a who, as in "Notify me" ? (I think we don't address the user as "me" in the other UI items).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't noticed there was a new message. I think we usually write "Show notification …"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except that here, it's not a regular Notification, which would be too small for this text.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a technical implementation detail? I don't think the user cares if the larger widget isn't technically a Notification with a capital N. :-P

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
text = _("Notify if book has publisher page numbers"),
text = _("Show notification if book has publisher page numbers"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get away with just Show notification when available?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever. Works for me. :-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is going to be the dialog box as before, I don't think we should use "notification" as this term is reserved. How about "Show prompt when ℗ available", or just "Prompt when ℗ available"

(Also, little nit-pick. The ℗ in the Override... menu item should be in parentheses: (℗).)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fits on 6"
8

@hius07

hius07 commented Oct 17, 2025

Copy link
Copy Markdown
Member Author

Unified info message (on new books opening, on Show source info, in Book info).

2

@poire-z

poire-z commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Unrelated to this PR, but when selecting chars per page, long-press on the arrows move only by 4. Going from 1500 to 500 could take a long time :) (before I thought I could tap on the number to input it directly).
May be some increment by 20 would be better than 4?

@Frenzie

Frenzie commented Oct 17, 2025

Copy link
Copy Markdown
Member

before I thought I could tap on the number to input it directly

You can. But otherwise agreed, 4 seems overly cautious.

@Commodore64user

Copy link
Copy Markdown
Member

That whole page numbers by the publisher sounds very clunky, perhaps something along the lines of "This ebook retains the publisher’s original page numbering". A bit more natural

@Frenzie

Frenzie commented Oct 17, 2025

Copy link
Copy Markdown
Member

I'd make that provides since something like retains or keeps sounds like you're forced to live with it.

I wouldn't mention any publisher at all, because who else would provide them? Santa Claus?

Simply:

This book provides stable page numbers.

@poire-z

poire-z commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

because who else would provide them? Santa Claus?

Synthetic Charperpage Jr.

@Commodore64user

Copy link
Copy Markdown
Member

I’m pretty sure i made the same comment before “provided by” which seems to have been ignored…

very funny @Frenzie but if we drop the facetiousness, is not that someone might assume that some higher up force is magically giving them page numbers, but about clarity of their origin.

@Frenzie

Frenzie commented Oct 17, 2025

Copy link
Copy Markdown
Member

While that argument about clarity strikes me as far-fetched — they were put in the EPUB by whoever prepared the EPUB, simple as that — turning it around might sound better:

The publisher has provided stable page numbers (for this book).
The publisher has included stable page numbers (in this book).

@hius07

hius07 commented Oct 17, 2025

Copy link
Copy Markdown
Member Author

What's the final wording?

@Frenzie

Frenzie commented Oct 17, 2025

Copy link
Copy Markdown
Member

I think keeping it short and simple (i.e., This book provides stable page numbers.) would be clearest, but I'm not sure if @poire-z and @Commodore64user agree.

@Commodore64user

Copy link
Copy Markdown
Member

Is not that i disagree, I simply think that adding the publisher bit sets the record straight. i.e., These are numbers that match a hardback and we have nothing to do with them.

@poire-z

poire-z commented Oct 17, 2025

Copy link
Copy Markdown
Contributor
The publisher has provided stable page numbers (for this book).
The publisher has included stable page numbers (in this book).

I prefer the latter: "included/in this book" makes it clear it's there in the epub, and that we don't get to go fetch them elsewhere where they are provided :)

This book includes publisher-provided stable page numbers: ?

@Frenzie

Frenzie commented Oct 17, 2025

Copy link
Copy Markdown
Member

I think it goes against good editing practice ("this book includes author-written words!") but whatever I suppose, it's not ungrammatical.

@Commodore64user

Copy link
Copy Markdown
Member

("this book includes author-written words!")

only authors don't paginate the content, When writing War and Peace (og name "War, what is it good for?", it was his mistress who convinced him to change the name), Tolstoy was not worried whether a certain scene would be on an even or odd page, the numbers are simply a byproduct of the words.

@jonnyl2

jonnyl2 commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Thanks for adding the Book info details. I have a few suggestions (screenshots are as-is with current PR):

1. Synthetic page numbers used, PPN available:

synpn_used_ppn_available

As a random user, I would interpret this as "131 publisher page numbers".

I'd suggest showing it like this:

Pages: 131 (1500 chars/page) | ℗

Left-hand info shows that synthetic pages are currently in use (with current char settings), and the PPN availability is delineated by a vertical bar to minimize confusion.

2. Publisher page numbers used:

ppn_available_and_used

The last publisher page label isn't necessarily the same as the number of pages. This book actually starts at publisher page number "[6]", so the actual publisher page count is only 92.

I'd suggest to show the integer count of the publisher page numbers instead, with the (P) to indicate PPN:

Pages: 92 (℗)

3. Screen page numbers used, PPN available:

scrpn_used_ppn_available

Suggestion:
Pages: 215 | 92 (℗)

Number by itself indicates screen pages, number right of bar with (P)-Symbol indicates publisher page number count.

@hius07

hius07 commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

Book info Pages - 8 pagemap combinations (use_pagemap, has_synthetic, has_publisher).

@poire-z poire-z left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to grasp the 8 combinations, so trusting you.

@hius07

hius07 commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

3 above cases.
1
2
3

Use screen pages, got both synthetic and publisher pages.
4

@Frenzie

Frenzie commented Oct 18, 2025

Copy link
Copy Markdown
Member

Looks good :)

@jonnyl2

jonnyl2 commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

Looks good to me, thanks. (Personally I would leave the 'chars per page' info out if stable pages are not enabled (4th screenshot). Or show it with the total synthetic page count. But without the total page count it doesn't carry much significance.)

@hius07

hius07 commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

show it with the total synthetic page count

This.

@hius07

hius07 commented Oct 18, 2025

Copy link
Copy Markdown
Member Author

Once synthetic page numbers are generated, they cannot be removed from the book via the UI.
The only way is to delete the book cr3 cache file (can be done by the file browser).

@Commodore64user

Copy link
Copy Markdown
Member

Late to the update, but a few more comments: the about page has the following bit "or if you prefer to have consistent page lengths for all books", that is clunky as well, better "or if you prefer a consistent page length for all books"

I would also change "one screen equals one page" to "one page displays exactly one screen of content"

Another “a page will be counted for this amount of characters” sounds weird, try "each page will contain this number of characters"

The second to last paragraph seems a bit difficult to parse if you are unfamiliar with how all that works under the hood, i would remove the "since..." and leave just the "you can choose..."

@poire-z

poire-z commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

I would also change "one screen equals one page" to "one page displays exactly one screen of content"

In all this, when we say "page", we mean "page numbers". "one page displays" just doesn't work for me, it is the screen that displays content.
"one screen equals one page" is just right in your face to explain the default, and why people for who it is obvious and wouldn't want anything else will just close this and say it's not for me.
Anything else won't be that obvious.

The second to last paragraph seems a bit difficult to parse if you are unfamiliar with how all that works under the hood, i would remove the "since..."

"Since stable page numbers can start anywhere on the screen" is also for me one of the key sentence that could answer questions that the above text could bring (ie. for me, when just seeing "page" and not "page numbers", the meaning gets less clear).

@jonnyl2

jonnyl2 commented Oct 19, 2025

Copy link
Copy Markdown
Contributor

I'm thinking that it could be helpful to always show screen pages as well in the Book info, even if something else is used? It will be the only place in the UI where the screen page count can still be checked (besides the stable page list). (Also, in the current release, it still shows screen pages in the Book info even if Reference pages are used, so some users might be missing it.)

Accordingly, the first two of the above cases would become:

787 (1500 chars per page) | 1077 | (℗)
544 (℗ xqlc) | 1077

Thoughts?

@hius07

hius07 commented Oct 19, 2025

Copy link
Copy Markdown
Member Author

Any corrections to the wordings?

table.insert(t, pages)
end
if self.ui.pagemap.chars_per_synthetic_page then
local cpp = "(" .. T(N_("1 char per page", "%1 chars per page",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full characters if it fits.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local cpp = "(" .. T(N_("1 char per page", "%1 chars per page",
local cpp = "(" .. T(N_("1 character per page", "%1 characters per page",

@jonnyl2 jonnyl2 Oct 19, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even as "chars per page" it is using a rather large amount of space. Example:
image

(And mind that books can have 5 digit page numbers.)

On the contrary, I would suggest we use the acronym "CPP" and also add it in the About text.

"CPP" is commonly used by typesetting caculators, e.g. this one

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case it should have a translator's note to point out that it should be short (or what CPP means, if going that route, but it seems a bit jargon).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- @translators characters per page
text = T(N_("1 char per page", "%1 chars per page", self.chars_per_synthetic_page), self.chars_per_synthetic_page)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already translated is good. 👍 Best to duplicate the note in case someone hits that one first. :-)


function ReaderPageMap:showDocumentProvidedInfo(get_text)
local t = _([[
This book has stable page numbers by the publisher (℗).

@Frenzie Frenzie Oct 19, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This book has stable page numbers by the publisher (℗).
This book includes stable page numbers from the publisher (℗).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggestion continues to be as awkward as the text is replaces. I’ll say it one last time “provided by” solves the issue, or use the other suggestion i can’t remember now

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not good on 6"
7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If you're talking about the wrap between publisher and (p), that will depend also on your screen DPI (people may get it also on 9", and I may not get it on 6"). If you want to avoid it, you should include a U+00A0 (non-break space) in between.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the wrap. 6" is still the most frequent eink screen size, isn't it?

@Frenzie Frenzie Oct 20, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the text should simply be This book includes stable page numbers, period. Anything else violates proper editing practice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be in the menu
[ ] Prompt when publisher page numbers available

and in the message
Publisher page numbers available

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the wrap. 6" is still the most frequent eink screen size, isn't it?

Yes. But what I mean is that what you see on your 6" may not be similar to what I see on my 6": there are other things at play when eg. scaleBySize the font size: the nb of pixels, the screen DPI selected in the menu (I may not have "auto", and a 6" device with 300 dpi or 272 dpi may get different things).
If you see some bad wrap, don't solve this by adding a word or increasing the width of the infomessage :) you should use a NBSP to avoid it in any conditions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You guys need to step out and focus on what's more important :D please don't fight over small nitpicks

@Frenzie

Frenzie commented Oct 19, 2025

Copy link
Copy Markdown
Member

See the three open comment threads.


function ReaderPageMap:showDocumentProvidedInfo(get_text)
local t = _([[
This book includes stable page numbers from the publisher (℗).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the noise. I think this is the last thing.

Suggested change
This book includes stable page numbers from the publisher (℗).
This book includes stable page numbers provided by the publisher (℗).

@hius07 hius07 merged commit 3f4ce6b into koreader:master Oct 20, 2025
4 checks passed
@hius07 hius07 deleted the stable-pages-2 branch October 20, 2025 16:02
@hius07 hius07 added this to the 2025.10 milestone Oct 20, 2025
@poire-z

poire-z commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Having just witness Book info tell me Pages: 602 | 421 ((p) 453) and really not getting what 421 is, and why 602 (I have hidden flows enabled on this book and my page count in the footer is 560), I think long-press on it should really tell me in English what these numbers (and others not shown, ie. page in main flow) all are (a bit like Estimated reading time left in statistics, which takes me by the hand).
(Off for a week, won't be able to contribute much to that new fun adventure :))

0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completely disable stable page numbers

6 participants