Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page offset for Arabic page numbering, set as 'pageOffset' field in book-config.js. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JulianOliver
Copy link

Set with 'pageOffset' int in book-config.js.
modified: book-config.js
modified: book.js

Author: Julian Oliver [email protected]
Committer: Julian Oliver [email protected]

Set with 'pageOffset' int in book-config.js.
modified:   book-config.js
modified:   book.js

Author:    Julian Oliver <[email protected]>
Committer: Julian Oliver <[email protected]>
@johanneswilm
Copy link
Contributor

Hey,
this might be a good idea for your special case, but for BookJS as a whole, it seems rather broken. In practice it will mean that page numbering will go this way:: I, II, III, IV, 26, 27, 28, 29

That just doesn't make a lot of sense for average users. So therefore I will not merge this patch.

I understand your underlying problem is that you just want one single numbering system for the entire book, so that those who read the book in a PDF reader only have to deal with one single numbering system and that page numbers will correspond to the page numbers the pdf reader uses.

This problem can be fixed by making BookJS work with a single page numbering system. If you (or someone else) programs this, I promise to merge it immediately. Doing this is a little more complicated, and my own time is now managed by the Booktype feature manager. It has been mentioned to him and so he will have to see whether and how I can be assigned to do this.

@JulianOliver
Copy link
Author

This might be a good idea for your special case, but for BookJS as a whole,
it seems rather broken. In practice it will mean that page numbering will
go this way:: I, II, III, IV, 26, 27, 28, 29

Yes, though only if pageOffset is set to something other than 0.

That just doesn't make a lot of sense for average users. So therefore I
will not merge this patch.

OK, no problem.

I understand your underlying problem is that you just want one single
numbering system for the entire book, so that those who read the book in a
PDF reader only have to deal with one single numbering system and that page
numbers will correspond to the page numbers the pdf reader uses.

Yes, that was quite a complaint with the existing book we put out. PDF reader
pages don't correspond to the actual pages read. It makes it hard to seek in big
books, forcing people to hunt with the scrollbar.

This problem can be fixed by making BookJS work with a single page
numbering system. If you (or someone else) programs this, I promise to
merge it immediately. Doing this is a little more complicated, and my own
time is now managed by the Booktype feature manager. It has been mentioned
to him and so he will have to see whether and how I can be assigned to do
this.

OK, well that shouldn't be too hard. If I find the time I'll send in the patch
;)

@johanneswilm
Copy link
Contributor

The reason why I set it up this way (roman numbers for frontmatter, arab numbers for the contents) is because there is at least theoretically a chicken and egg problem: when you add an item to the TOC, it will take up more space and could therefore push the just listed item onto a later page. A procedure would have to be set up to go through the toc process so many times until page numbers no longer change (in 99.9999999% of cases that will be the case by the second round).

Maybe the easiest would be to store the html code of the TOC. The rerun the TOC creation until it doesn't change anymore. As far as I can tell, this should be safe.

Now with later additions, the book is being "rerendered" several times anyway for the purpose of setting footnotes, etc. . running it another time shouldn't matter if it's only done once. But sya you have it in an editor view, then one should probably watch out not to do it every other second.

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.

2 participants