Paginate every second page #6869
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds a new option to the pagination mode menu.
"Sheet counting with empty page"/"Blattzählung mit Leerseite" allows a pagination with a counter increased for every second page while alternating between the counter and "UNCOUNTED".
This produces a pagination like this:
1, UNCOUNTED, 2, UNCOUNTED, 3, UNCOUNTED, …This mode is also compatible with:
roman (
I, UNCOUNTED, II, UNCOUNTED, …) andalphabetic (
a, UNCOUNTED, b, UNCOUNTED, …) pagination.Technical base for this new mode is a String like this:
¿UNCOUNTED¡1½It can also be used in the advanced pagination (The
1can be replaced with a different start value, also using a start value for roman or alphabetic pagination, likeIor´a´).To be able to output the counter conditionally on every second page, a code adjustment was necessary.
This adjustment has one constraint for advanced pagination:
The characters following
¿and¡are no longer interpreted as free text (implicitly!).For example, using a string like
¿vto outputvfor every second page now requires (explicit) escaping to prevent an interpretation as roman numeral:¿`v`.(That means configurations like recto verso pagination change, e.g. from
1°¡r¿v½to1°¡r¿`v`½.)This only affects the advanced pagination. Additional escaping is only necessary for characters that should be free text, but could be interpreted as roman numerals or decimals (
I, i, V, v, X, x, 1, 2, 3, …).More details on why this is necessary
Generally, it is necessary to escape free text with back ticks (
`) to prevent unwanted evaluation.This was not necessary for text following
¿or¡(e.g. in1°¡r¿v½for recto verso pagination =1r, 1v, 2r, 2v, …), as text following¿and¡was implicitly interpreted as free text.To output the counter on every second page, a String like
¡1would be necessary, but did not work in this combination, as¡prevented the interpretation of1as counter).This implicit interpretation as free text is removed in this PR, as it prevented any conditional output of a counter.
This change is only relevant to users of the advanced pagination, as all other counting modes like "Recto Verso Pagination" have already been adjusted accordingly in this PR.
Resolves #6457.