diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-01-08 23:58:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-01-08 23:58:00 +0100 |
commit | b49a72625ea82574863b42d6b8782c9ce9aba4f7 (patch) | |
tree | 45307e33f4e1ff9c50aca46fb9fdc6f7455e378c /tex/context/base/page-lay.mkiv | |
parent | f43952a7dc197eb796722c4ca4a5ccb5638b5165 (diff) | |
download | context-b49a72625ea82574863b42d6b8782c9ce9aba4f7.tar.gz |
beta 2010.01.08 23:58
Diffstat (limited to 'tex/context/base/page-lay.mkiv')
-rw-r--r-- | tex/context/base/page-lay.mkiv | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/tex/context/base/page-lay.mkiv b/tex/context/base/page-lay.mkiv index c7dabb66d..80e2574c6 100644 --- a/tex/context/base/page-lay.mkiv +++ b/tex/context/base/page-lay.mkiv @@ -995,12 +995,12 @@ \newif\ifshiftedrealpageno -% We could use nested if here plu ssone \@EAEAEA's but but the +% We could use nested if here plus some \@EAEAEA's but but the % next variant has less expansion which is nicer in tracing. -\def\doifoddpageelse {\ifshiftedrealpageno\expandafter\doifoddpageelseyes\else\expandafter\doifoddpageelsenop\fi} -\def\doifoddpageelseyes{\ifodd\realpageno\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments\fi} -\def\doifoddpageelsenop{\ifodd\realpageno\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi} +\def\doifoddpageelse {\ifshiftedrealpageno\expandafter\doifoddpageelseyes \else\expandafter\doifoddpageelsenop \fi} +\def\doifoddpageelseyes{\ifodd \realpageno\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments \fi} +\def\doifoddpageelsenop{\ifodd \realpageno\expandafter\firstoftwoarguments \else\expandafter\secondoftwoarguments\fi} \let\doifonevenpaginaelse\doifoddpageelse @@ -1032,6 +1032,30 @@ \def\settexthoffset {\texthoffset\doifbothsides\backspace\backspace{\dimexpr\paperwidth-\backspace-\makeupwidth\relax}} +% The next hack is too tricky as we may shipout more pages: +% +% \def\freezepagestatechecks +% {\the\everyfreezepagestatechecks} +% +% \newtoks \everyfreezepagestatechecks +% +% \appendtoks +% \doifbothsides +% {\let\doifbothsides\firstofthreearguments}% +% {\let\doifbothsides\secondofthreearguments}% +% {\let\doifbothsides\thirdofthreearguments}% +% \rightorleftpageaction +% {\let\rightorleftpageaction\firstoftwoarguments}% +% {\let\rightorleftpageaction\secondoftwoarguments}% +% \doifmarginswapelse +% {\let\doifmarginswapelse\firstoftwoarguments}% +% {\let\doifmarginswapelse\secondoftwoarguments}% +% \to \everyfreezepagestatechecks +% +% \prependtoks +% \freezepagestatechecks +% \to \everybeforeshipout + \def\goleftonpage {\hskip-\dimexpr\leftmargindistance+\leftmarginwidth+\leftedgedistance+\leftedgewidth\relax} |