1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Screen Macros References}
15
16\registerctxluafile{scrnref}{}
17
18\unprotect
19
20\appendtoks
21 \doifsomething{\interactionparameter\c!calculate}
22 {\clf_setfieldcalculationset{\interactionparameter\c!calculate}}
23 \doifelse{\interactionparameter\c!click }\v!yes
24 \settrue\setfalse\highlighthyperlinks
25 \doifelse{\interactionparameter\c!display}\v!new
26 \settrue\setfalse\gotonewwindow
27 \doifnot {\interactionparameter\c!page}\v!no
28 \scrn_reference_enable_page_destinations
29\to \everysetupinteraction
30
31\def\scrn_reference_enable_page_destinations
32 {\clf_setreferencelinkmethod{\interactionparameter\c!page}}
33
34\setupinteraction
35 [\c!page=\v!no,
36 \c!click=\v!yes,
37 \c!display=\v!normal,
38 \c!focus=\v!fit,
39
40 \c!focusoffset=5\points,
41 \c!calculate=,
42
43 \c!width=\emwidth,
44 \c!height=\zeropoint,
45 \c!depth=\zeropoint,
46 \c!symbolset=]
47
48
49
50\appendtoks
51 \enabledirectives[destinations.offset=\the\dimexpr\interactionparameter\c!focusoffset\relax]
52\to \everysetupinteraction
53
54
55
56\def\scrn_reference_set_text_actions
57 {\iflocation
58 \edef\currentinteractionopenaction {\interactionparameter\c!openaction }
59 \edef\currentinteractioncloseaction{\interactionparameter\c!closeaction}
60 \ifx\currentinteractionopenaction\empty \else
61 \clf_setopendocumentaction{\currentinteractionopenaction}
62 \fi
63 \ifx\currentinteractioncloseaction\empty \else
64 \clf_setclosedocumentaction{\currentinteractioncloseaction}
65 \fi
66 \glet\scrn_reference_set_text_actions\relax
67 \fi}
68
69\def\scrn_reference_set_page_actions
70 {\iflocation
71 \edef\currentinteractionopenpageaction {\interactionparameter\c!openpageaction }
72 \edef\currentinteractionclosepageaction{\interactionparameter\c!closepageaction}
73 \ifx\currentinteractionopenpageaction\empty \else
74 \clf_setopenpageaction{\currentinteractionopenpageaction}
75 \fi
76 \ifx\currentinteractionclosepageaction\empty \else
77 \clf_setclosepageaction{\currentinteractionclosepageaction}
78 \fi
79 \fi}
80
81\appendtoks \scrn_reference_set_text_actions \to \everyshipout
82\appendtoks \scrn_reference_set_page_actions \to \everyshipout
83
84
85
86
87
88
89
90
91
92
93
94
95
96\setupinteraction
97 [\c!openaction=,
98 \c!closeaction=,
99 \c!openpageaction=,
100 \c!closepageaction=]
101
102\protect \endinput
103 |