diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/scrn-pag.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/scrn-pag.mkvi | 123 |
1 files changed, 43 insertions, 80 deletions
diff --git a/Master/texmf-dist/tex/context/base/scrn-pag.mkvi b/Master/texmf-dist/tex/context/base/scrn-pag.mkvi index 8e1dbde8e9c..66f197ffdc2 100644 --- a/Master/texmf-dist/tex/context/base/scrn-pag.mkvi +++ b/Master/texmf-dist/tex/context/base/scrn-pag.mkvi @@ -5,7 +5,7 @@ %D subtitle=Pages, % moved code %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for @@ -19,8 +19,10 @@ \unprotect -\installparameterhandler \??sc {interactionscreen} -\installsetuphandler \??sc {interactionscreen} +\installcorenamespace{interactionscreen} + +\installparameterhandler \??interactionscreen {interactionscreen} +\installsetuphandler \??interactionscreen {interactionscreen} \newdimen\canvaswidth \newdimen\canvasheight @@ -29,68 +31,7 @@ \newdimen\canvasmaxwidth \newdimen\canvasmaxheight -\newconditional\scrn_canvas_tight_page - -% \def\scrn_canvas_calculate -% {\begingroup -% \edef\currentinteractionscreenwidth {\interactionscreenparameter\c!width }% -% \edef\currentinteractionscreenheight{\interactionscreenparameter\c!height}% -% \canvasbackoffset\backspace -% \canvastopoffset\topspace -% \ifx\currentinteractionscreenwidth\v!fit -% \global\canvaswidth\leftcombitotal -% \ifdim\backspace>\canvaswidth -% \ifdim\backspace>\zeropoint\relax -% \global\advance\canvasbackoffset -\canvaswidth -% \fi -% \fi -% \global\advance\canvaswidth\dimexpr -% \rightcombitotal -% + 2\dimexpr -% \interactionscreenparameter\c!backspace -% + \interactionscreenparameter\c!horoffset -% \relax -% \relax -% \donetrue -% \else\ifx\currentinteractionscreenwidth\v!max -% \global\canvaswidth\printpaperwidth -% \donetrue -% \else -% \global\canvaswidth\currentinteractionscreenwidth -% \donefalse -% \fi\fi -% \ifdone -% \ifdim\canvaswidth>\paperwidth\ifdim\canvaswidth>\zeropoint -% \global\paperwidth\canvaswidth % kills location=middle -% \fi\fi -% \fi -% \ifx\currentinteractionscreenheight\v!fit -% \global\canvasheight\dimexpr\topheight+\topdistance\relax -% \ifdim\topspace>\canvasheight -% \ifdim\topspace>\zeropoint\relax -% \global\advance\canvastopoffset -\canvasheight -% \fi -% \fi -% \global\advance\canvasheight\dimexpr -% \makeupheight -% + \bottomdistance -% + \bottomheight -% + 2\dimexpr -% \interactionscreenparameter\c!topspace -% + \interactionscreenparameter\c!veroffset -% \relax -% \relax -% \else\ifx\currentinteractionscreenheight\v!max -% \global\canvasheight\printpaperheight -% \else -% \global\canvasheight\currentinteractionscreenheight -% \fi\fi -% \ifdone -% \ifdim\canvasheight>\paperheight\ifdim\canvasheight>\zeropoint -% \global\paperheight\canvasheight % kills location=middle -% \fi\fi -% \fi -% \endgroup} +\newconditional\c_scrn_canvas_tight_page \def\scrn_canvas_calculate {\begingroup @@ -98,26 +39,50 @@ \edef\currentinteractionscreenheight{\interactionscreenparameter\c!height}% \canvasbackoffset\backspace \canvastopoffset\topspace - \ifx\currentinteractionscreenwidth\v!fit - \global\canvaswidth\leftcombitotal + \ifx\currentinteractionscreenwidth\v!max + \global\canvaswidth\printpaperwidth + \else\ifx\currentinteractionscreenwidth\v!fit + \global\canvaswidth\dimexpr + \leftcombitotal + + \makeupwidth + + \rightcombitotal + + 2\dimexpr + \interactionscreenparameter\c!backspace + + \interactionscreenparameter\c!horoffset + \relax + \relax + \else\ifx\currentinteractionscreenwidth\v!tight \ifdim\backspace>\canvaswidth \ifdim\backspace>\zeropoint\relax \global\advance\canvasbackoffset -\canvaswidth \fi \fi \global\advance\canvaswidth\dimexpr - \rightcombitotal + \makeupwidth + + \rightcombitotal + 2\dimexpr \interactionscreenparameter\c!backspace + \interactionscreenparameter\c!horoffset \relax \relax - \else\ifx\currentinteractionscreenwidth\v!max - \global\canvaswidth\printpaperwidth \else \global\canvaswidth\currentinteractionscreenwidth - \fi\fi - \ifx\currentinteractionscreenheight\v!fit + \fi\fi\fi + \ifx\currentinteractionscreenheight\v!max + \global\canvasheight\printpaperheight + \else\ifx\currentinteractionscreenheight\v!fit + \global\canvasheight\dimexpr + \topheight + + \topdistance + + \makeupheight + + \bottomdistance + + \bottomheight + + 2\dimexpr + \interactionscreenparameter\c!topspace + + \interactionscreenparameter\c!veroffset + \relax + \relax + \else\ifx\currentinteractionscreenheight\v!tight \global\canvasheight\dimexpr\topheight+\topdistance\relax \ifdim\topspace>\canvasheight \ifdim\topspace>\zeropoint\relax @@ -133,15 +98,13 @@ + \interactionscreenparameter\c!veroffset \relax \relax - \else\ifx\currentinteractionscreenheight\v!max - \global\canvasheight\printpaperheight \else \global\canvasheight\currentinteractionscreenheight - \fi\fi - \ifconditional\page_location_is_set - \global\setfalse\scrn_canvas_tight_page + \fi\fi\fi + \ifconditional\c_page_layouts_location_is_set + \global\setfalse\c_scrn_canvas_tight_page \fi - \ifconditional\scrn_canvas_tight_page + \ifconditional\c_scrn_canvas_tight_page \global\canvasmaxwidth \paperwidth \global\canvasmaxheight\paperheight \else @@ -183,8 +146,8 @@ \appendtoks \doifcommonelse{\interactionscreenparameter\c!option}{\v!max,\v!fit}% - {\global\settrue \scrn_canvas_tight_page}% - {\global\setfalse\scrn_canvas_tight_page}% + {\global\settrue \c_scrn_canvas_tight_page}% + {\global\setfalse\c_scrn_canvas_tight_page}% \to \everysetupinteractionscreen \appendtoks |