diff options
Diffstat (limited to 'tex/context/base/mkiv/strc-pag.mkiv')
-rw-r--r-- | tex/context/base/mkiv/strc-pag.mkiv | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tex/context/base/mkiv/strc-pag.mkiv b/tex/context/base/mkiv/strc-pag.mkiv index d56f0de54..e25b47f12 100644 --- a/tex/context/base/mkiv/strc-pag.mkiv +++ b/tex/context/base/mkiv/strc-pag.mkiv @@ -309,6 +309,8 @@ % some day ifsinglesided and ifdoublesided will become obsolete +\newtoks\everysidedswitch + \appendtoks \singlesidedfalse \setfalse\layoutisdoublesided \doublesidedfalse \setfalse\layoutissinglesided @@ -317,13 +319,7 @@ \processallactionsinset[\directpagenumberingparameter\c!alternative] [ \v!singlesided=>\setsystemmode\v!singlesided\singlesidedtrue\settrue\layoutissinglesided, \v!doublesided=>\setsystemmode\v!doublesided\doublesidedtrue\settrue\layoutisdoublesided]% - \ifdefined\trackingmarginnotestrue - \ifdoublesided - \trackingmarginnotestrue - \else - \trackingmarginnotesfalse - \fi - \fi + \the\everysidedswitch \pageduplexmode \ifsinglesided \ifdoublesided\plustwo\else\zerocount\fi @@ -334,6 +330,16 @@ \strc_pagenumbers_set_location \to \everysetuppagenumbering +\appendtoks + \ifdefined\trackingmarginnotestrue + \ifdoublesided + \trackingmarginnotestrue + \else + \trackingmarginnotesfalse + \fi + \fi +\to \everysidedswitch + \ifdefined \page_backgrounds_recalculate \else \let\page_backgrounds_recalculate\relax \fi @@ -401,11 +407,10 @@ \unexpanded\def\strc_pagenumbers_check_state_change#1#2% {\edef\m_strc_pagenumbers_state_new{\namedcounterparameter#1\c!state}% \ifx\m_strc_pagenumbers_state_new\m_strc_pagenumbers_state_old \else - \doifelse\m_strc_pagenumbers_state_new\v!start - {#2\plustwo}% - {#2\zerocount}% + #2\ifx\m_strc_pagenumbers_state_new\v!start\plustwo\else\zerocount\fi \fi} + \appendtoks % todo: set state: none, start, stop, reset \strc_pagenumbers_check_state_change\s!realpage\c_strc_pagenumbers_state_realpage \to \everysetuprealpagenumber |