diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/strc-pag.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/strc-pag.mkiv | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-pag.mkiv b/Master/texmf-dist/tex/context/base/strc-pag.mkiv index 6eddc0fba71..72f0cf32aa8 100644 --- a/Master/texmf-dist/tex/context/base/strc-pag.mkiv +++ b/Master/texmf-dist/tex/context/base/strc-pag.mkiv @@ -26,12 +26,14 @@ \countdef\subpageno \plustwo \subpageno \zerocount % ! \countdef\arrangeno \plusthree \arrangeno \zerocount % ! \countdef\pagenoshift\plusfour \pagenoshift\zerocount % ! +\countdef\lastpageno \plusfive \lastpageno \zerocount % ! \let\pageno\userpageno \def\realfolio{\the\realpageno} \def\userfolio{\the\userpageno} \def\subfolio {\the\subpageno } +\def\lastfolio{\the\lastpageno} \newtoks\everyinitializepagecounters @@ -103,6 +105,7 @@ \strc_counters_set\s!realpage\realpageno \strc_counters_set\s!userpage\userpageno \strc_counters_set\s!subpage \subpageno + \lastpageno\lastcountervalue[\s!realpage]\relax \to \everyinitializepagecounters \let\setuppagenumber\setupuserpagenumber @@ -111,24 +114,25 @@ % invisible = \def\strc_pagenumbers_page_state_save % \normalexpanded? - {\ctxcommand{savepagedata({ - prefix = "\namedcounterparameter\s!userpage\c!prefix", - separatorset = "\namedcounterparameter\s!userpage\c!prefixseparatorset", - conversion = "\namedcounterparameter\s!userpage\c!prefixconversion", - conversionset = "\namedcounterparameter\s!userpage\c!prefixconversionset", - set = "\namedcounterparameter\s!userpage\c!prefixset", - segments = "\namedcounterparameter\s!userpage\c!prefixsegments", - connector = \!!bs\namedcounterparameter\s!userpage\c!prefixconnector\!!es, - },{ - conversion = "\namedcounterparameter\s!userpage\c!numberconversion", - conversionset = "\namedcounterparameter\s!userpage\c!numberconversionset", - starter = \!!bs\namedcounterparameter\s!userpage\c!numberstarter\!!es, - stopper = \!!bs\namedcounterparameter\s!userpage\c!numberstopper\!!es, - },{ - viewerprefix = \!!bs\namedcounterparameter\s!userpage\c!viewerprefix\!!es, - state = \!!bs\namedcounterparameter\s!userpage\c!state\!!es, - } - )}} + {\clf_savepagedata + { + prefix {\namedcounterparameter\s!userpage\c!prefix} + separatorset {\namedcounterparameter\s!userpage\c!prefixseparatorset} + conversion {\namedcounterparameter\s!userpage\c!prefixconversion} + conversionset {\namedcounterparameter\s!userpage\c!prefixconversionset} + set {\namedcounterparameter\s!userpage\c!prefixset} + segments {\namedcounterparameter\s!userpage\c!prefixsegments} + connector {\namedcounterparameter\s!userpage\c!prefixconnector} + }{ + conversion {\namedcounterparameter\s!userpage\c!numberconversion} + conversionset {\namedcounterparameter\s!userpage\c!numberconversionset} + starter {\namedcounterparameter\s!userpage\c!numberstarter} + stopper {\namedcounterparameter\s!userpage\c!numberstopper} + }{ + viewerprefix {\namedcounterparameter\s!userpage\c!viewerprefix} + state {\namedcounterparameter\s!userpage\c!state} + }% + \relax} \prependtoks \strc_pagenumbers_page_state_save @@ -303,6 +307,12 @@ \trackingmarginnotesfalse \fi \fi + \pageduplexmode + \ifsinglesided + \ifdoublesided\plustwo\else\zerocount\fi + \else + \ifdoublesided\plusone\else\zerocount\fi + \fi \page_backgrounds_recalculate \strc_pagenumbers_set_location \to \everysetuppagenumbering |