diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-lay.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/page-lay.tex | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-lay.tex b/Master/texmf-dist/tex/context/base/page-lay.tex index 5a5bafe24be..20d9e66860b 100644 --- a/Master/texmf-dist/tex/context/base/page-lay.tex +++ b/Master/texmf-dist/tex/context/base/page-lay.tex @@ -314,7 +314,7 @@ % {\dodosetuppapersize[#1][#2]}}} % % The next version is more extensive; here we can -% associate paper and page with key/value like settinsg, +% associate paper and page with key/value like settings, % which is handy in 'example' when we use setups \def\setuppaper[#1]% @@ -354,8 +354,7 @@ \fi\fi\fi} \def\dododosetuppapersize[#1][#2]% - {\xdef\restorepapersize - {\noexpand\setuppapersize[#1][#2]}% + {\xdef\restorepapersize{\noexpand\setuppapersize[#1][#2]}% \dosetuppaperorientation{#1}\paperlandscape\paperorientation\paperreverse\papermirror \dosetuppaperorientation{#2}\printlandscape\printorientation\printreverse\printmirror \def\docommando##1% @@ -609,13 +608,21 @@ % % \startstandardmakeup[page=blank] ... \stopstandardmakeup +% \def\checkcurrentlayout % public and used in naw, so keep this name +% {\ifundefined{\??ly\realfolio\c!state}% +% \doifoddpageelse\checkcurrentoddlayout\checkcurrentevenlayout +% \else +% \doifvalue{\??ly\realfolio\c!state}\v!start +% {\xdef\currentlayout{\realfolio}\recalculatelayout}% new, global +% \fi} + \def\checkcurrentlayout % public and used in naw, so keep this name - {\ifundefined{\??ly\realfolio\c!state}% - \doifoddpageelse\checkcurrentoddlayout\checkcurrentevenlayout - \else - \doifvalue{\??ly\realfolio\c!state}\v!start - {\xdef\currentlayout{\realfolio}\recalculatelayout}% new, global - \fi} + {\doifundefinedelse{\??ly\realfolio\c!state} + {\doifundefinedelse{\??ly\v!current\c!state} + {\doifoddpageelse\checkcurrentoddlayout\checkcurrentevenlayout} + {\globallet\currentlayout\v!current\recalculatelayout}} + {\doifvalue{\??ly\realfolio\c!state}\v!start + {\xdef\currentlayout{\realfolio}\recalculatelayout}}} % new, global \def\checkcurrentoddlayout {\ifundefined{\??ly\v!odd\c!state}\else @@ -629,7 +636,15 @@ {\globallet\currentlayout\v!even\recalculatelayout}% new, global \fi} -\appendtoks \checkcurrentlayout \to \everyaftershipout +% \appendtoks \checkcurrentlayout \to \everyaftershipout + +\appendtoks + \ifx\currentlayout\v!current + \globallet\currentlayout\empty + \global\letbeundefined{\??ly\v!current\c!state}% + \checkcurrentlayout + \fi +\to \everyaftershipout \newif\ifdoublesidedprint @@ -848,7 +863,7 @@ \def\orientpagebodybox#1#2#3% {\ifnum#2#3>\zerocount \setbox#1\vbox - {\edef\somerotation{\ifdubbelzijdig\ifodd\realpageno#2\else#3\fi\else#2\fi}% + {\edef\somerotation{\ifdoublesided\ifodd\realpageno#2\else#3\fi\else#2\fi}% \dorotatebox\somerotation\hbox{\box#1}}% \fi} @@ -925,28 +940,22 @@ \ifnum\verticalcutmarks >2 \chardef\colormarkoffset4 \fi #1{#2}} -\newif\ifdubbelzijdig \dubbelzijdigfalse -\newif\ifenkelzijdig \enkelzijdigtrue - -\def\doifsometextlineelse#1% - {\edef\!!stringa{\csname\??tk#1\c!state\endcsname}% - \ifx\!!stringa\v!none - \@EA\secondoftwoarguments - \else\ifx\!!stringa\v!high - \@EAEAEA\secondoftwoarguments - \else - \@EAEAEA\firstoftwoarguments - \fi\fi} +\newif\ifdoublesided \doublesidedfalse +\newif\ifsinglesided \singlesidedtrue % NOG EENS NAGAAN WANNEER NU GLOBAL EN WANNEER NIET +\ifx\doifelselayoutsomeline\undefined % defined in page-txt + \let\doifelselayoutsomeline\secondofthreearguments +\fi + \def\calculatevsizes % global needed in \recalculatelayoutregel {\redoglobal\textheight\makeupheight - \doifsometextlineelse \v!header + \doifelselayoutsomeline \v!header {\redoglobal\advance\textheight -\headerheight \redoglobal\advance\textheight -\headerdistance}% \donothing - \doifsometextlineelse \v!footer + \doifelselayoutsomeline \v!footer {\redoglobal\advance\textheight -\footerheight \redoglobal\advance\textheight -\footerdistance}% \donothing @@ -965,12 +974,12 @@ \def\calculatereducedvsizes {\textheight\makeupheight - \doifsometextlineelse \v!header + \doifelselayoutsomeline \v!header {\advance\textheight -\headerheight \advance\textheight -\headerdistance}% {\headerheight\zeropoint \setlayoutdistances}% - \doifsometextlineelse \v!footer + \doifelselayoutsomeline \v!footer {\advance\textheight -\footerheight \advance\textheight -\footerdistance}% {\footerheight\zeropoint @@ -1027,15 +1036,15 @@ % what are those \relax'es doing there? \def\doifbothsidesoverruled#1\orsideone#2\orsidetwo#3\od - {\ifdubbelzijdig + {\ifdoublesided \doifoddpageelse{#2}{#3}\relax \else #1\relax \fi} \def\doifbothsides#1\orsideone#2\orsidetwo#3\od - {\ifdubbelzijdig - \ifenkelzijdig + {\ifdoublesided + \ifsinglesided #1\relax \else \doifoddpageelse{#2}{#3}\relax @@ -1075,8 +1084,8 @@ \the\everyswapmargins} \def\rightorleftpageaction - {\ifdubbelzijdig - \ifenkelzijdig + {\ifdoublesided + \ifsinglesided \@EAEAEA\firstoftwoarguments \else \@EAEAEA\doifoddpageelse |