summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/scrn-pag.mkvi
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/scrn-pag.mkvi')
-rw-r--r--Master/texmf-dist/tex/context/base/scrn-pag.mkvi77
1 files changed, 52 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/context/base/scrn-pag.mkvi b/Master/texmf-dist/tex/context/base/scrn-pag.mkvi
index 5bbdadda885..3dfcd65c5ff 100644
--- a/Master/texmf-dist/tex/context/base/scrn-pag.mkvi
+++ b/Master/texmf-dist/tex/context/base/scrn-pag.mkvi
@@ -124,30 +124,49 @@
%
% \starttext \input ward \stoptext
-\def\scrn_canvas_synchronize_simple
- {\ctxcommand{setupcanvas{
- paperwidth = \number\printpaperwidth,
- paperheight = \number\printpaperheight
- }}}
+\let\scrn_canvas_synchronize_simple \relax
+\let\scrn_canvas_synchronize_complex\relax
-\def\scrn_canvas_synchronize_complex
+\appendtoks
+ \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple_indeed
+ \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
+\to \everysetuplayout
+
+\def\scrn_canvas_synchronize_simple_indeed
+ {\clf_setupcanvas
+ paperwidth \printpaperwidth
+ paperheight \printpaperheight
+ \relax
+ %\global\let\scrn_canvas_synchronize_simple \relax
+ \global\let\scrn_canvas_synchronize_complex\relax}
+
+\def\scrn_canvas_synchronize_complex_indeed
{\scrn_canvas_calculate % otherwise we need to hook it into setuppage etc
- \ctxcommand{setupcanvas{
- mode = "\interactionscreenparameter\c!option",
- singlesided = \ifsinglesided true\else false\fi,
- doublesided = \ifdoublesided true\else false\fi,
- leftoffset = \number\canvasbackoffset,
- topoffset = \number\canvastopoffset,
- width = \number\canvaswidth,
- height = \number\canvasheight,
- paperwidth = \number\canvasmaxwidth,
- paperheight = \number\canvasmaxheight
- }}}
+ \clf_setupcanvas
+ mode {\interactionscreenparameter\c!option}%
+ singlesided \ifsinglesided true\else false\fi\space
+ doublesided \ifdoublesided true\else false\fi\space
+ leftoffset \canvasbackoffset
+ topoffset \canvastopoffset
+ width \canvaswidth
+ height \canvasheight
+ paperwidth \canvasmaxwidth
+ paperheight \canvasmaxheight
+ \relax
+ %\global\let\scrn_canvas_synchronize_simple \relax
+ \global\let\scrn_canvas_synchronize_complex\relax}
\appendtoks
- \doifcommonelse{\interactionscreenparameter\c!option}{\v!max,\v!fit}%
- {\global\settrue \c_scrn_canvas_tight_page}%
- {\global\setfalse\c_scrn_canvas_tight_page}%
+ \begingroup
+ \edef\p_option{\interactionscreenparameter\c!option}%
+ \ifx\p_option\v!max
+ \global\settrue \c_scrn_canvas_tight_page
+ \else\ifx\p_option\v!fit
+ \global\settrue \c_scrn_canvas_tight_page
+ \else
+ \global\setfalse\c_scrn_canvas_tight_page
+ \fi\fi
+ \endgroup
\to \everysetupinteractionscreen
\setupinteractionscreen
@@ -159,6 +178,11 @@
\c!topspace=\topspace,
\c!option=\v!auto]
+\appendtoks
+ \global\let\scrn_canvas_synchronize_simple \scrn_canvas_synchronize_simple
+ \global\let\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex
+\to \everysetupinteractionscreen
+
%D Conditional page breaks:
\unexpanded\def\screen
@@ -177,7 +201,10 @@
{\dosingleempty\scrn_transitions_setup}
\def\scrn_transitions_setup[#list]%
- {\edef\scrn_transitions_list{#list}}
+ {\edef\scrn_transitions_list{#list}%
+ \ifx\scrn_transitions_list\v!reset
+ \let\scrn_transitions_list\empty
+ \fi}
\def\scrn_transitions_set
{\iflocation \ifx\scrn_transitions_list\empty \else
@@ -187,10 +214,10 @@
\def\scrn_transitions_set_indeed
{\begingroup
\edef\currentinteractionscreendelay{\interactionscreenparameter\c!delay}%
- \ctxcommand{setpagetransition{
- n = "\scrn_transitions_list",
- delay = "\ifx\currentinteractionscreendelay\v!none 0\else\currentinteractionscreendelay\fi"
- }}%
+ \clf_setpagetransition
+ n {\scrn_transitions_list}%
+ delay \ifx\currentinteractionscreendelay\v!none \zerocount\else\currentinteractionscreendelay\fi
+ \relax
\endgroup}
\prependtoks