diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-10-31 00:09:22 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-10-31 00:09:22 +0100 |
commit | 7043cd3b7046f6a11112a5d49c4ae5e2dc0c6896 (patch) | |
tree | 92ffcd258fb29e37b4a136eb071fbfd0717be29e /tex/context/base/mkiv/core-dat.mkiv | |
parent | a0270f13065d116355a953c6f246cbba26289fc2 (diff) | |
download | context-7043cd3b7046f6a11112a5d49c4ae5e2dc0c6896.tar.gz |
2020-10-30 22:27:00
Diffstat (limited to 'tex/context/base/mkiv/core-dat.mkiv')
-rw-r--r-- | tex/context/base/mkiv/core-dat.mkiv | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/core-dat.mkiv b/tex/context/base/mkiv/core-dat.mkiv index 9f4344b99..41a84c3e6 100644 --- a/tex/context/base/mkiv/core-dat.mkiv +++ b/tex/context/base/mkiv/core-dat.mkiv @@ -77,9 +77,12 @@ \installcommandhandler \??pagestate {pagestate} \??pagestate +% \def\syst_pagestates_allocate +% {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname +% \expandafter\let\expandafter\c_syst_pagestate\csname\??pagestatecounter\currentpagestate\endcsname} + \def\syst_pagestates_allocate - {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname - \expandafter\let\expandafter\c_syst_pagestate\csname\??pagestatecounter\currentpagestate\endcsname} + {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname} \appendtoks \syst_pagestates_allocate @@ -91,19 +94,37 @@ \unexpanded\def\setpagestate {\dodoubleempty\syst_pagestates_set} +% \def\syst_pagestates_set[#1][#2]% +% {\begingroup +% \edef\currentpagestate{#1}% +% \ifcsname\??pagestatecounter\currentpagestate\endcsname +% \let\c_syst_pagestate\lastnamedcs +% \else +% \syst_pagestates_allocate +% \fi +% \global\advance\c_syst_pagestate\plusone +% \scratchcounter\lastnamedcs +% \clf_setpagestate +% name {\currentpagestate}% +% tag {\ifsecondargument#2\else\number\c_syst_pagestate\fi}% +% delay {\pagestateparameter\c!delay}% +% \relax +% \endgroup} + \def\syst_pagestates_set[#1][#2]% {\begingroup \edef\currentpagestate{#1}% \ifcsname\??pagestatecounter\currentpagestate\endcsname - \let\c_syst_pagestate\lastnamedcs + \scratchcounter\lastnamedcs + \advance\scratchcounter\plusone \else + \scratchcounter\plusone \syst_pagestates_allocate \fi - \global\advance\c_syst_pagestate\plusone - \scratchcounter\lastnamedcs + \global\csname\??pagestatecounter\currentpagestate\endcsname\scratchcounter \clf_setpagestate name {\currentpagestate}% - tag {\ifsecondargument#2\else\number\c_syst_pagestate\fi}% + tag {\ifsecondargument#2\else\number\scratchcounter\fi}% delay {\pagestateparameter\c!delay}% \relax \endgroup} |