diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/scrn-ref.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/scrn-ref.mkvi | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/scrn-ref.mkvi b/Master/texmf-dist/tex/context/base/scrn-ref.mkvi new file mode 100644 index 00000000000..8c3f4fb4aba --- /dev/null +++ b/Master/texmf-dist/tex/context/base/scrn-ref.mkvi @@ -0,0 +1,90 @@ +%D \module +%D [ file=scrn-ref, +%D version=1998.01.15, +%D title=\CONTEXT\ Screen Macros, +%D subtitle=References, % moved code +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Screen Macros / References} + +\registerctxluafile{scrn-ref}{1.001} + +\unprotect + +\appendtoks + \doifsomething{\interactionparameter\c!calculate}{\doregistercalculationset{\interactionparameter\c!calculate}}% + \doifelse{\interactionparameter\c!click }\v!yes \settrue \setfalse \highlighthyperlinks + \doifelse{\interactionparameter\c!display}\v!new \settrue \setfalse \gotonewwindow + \doifnot {\interactionparameter\c!page }\v!no \scrn_reference_enable_page_destinations +\to \everysetupinteraction + +\def\scrn_reference_enable_page_destinations % no reset + {\ctxlua{structures.references.setinnermethod("\interactionparameter\c!page")}} + +\setupinteraction % start fit page and reset form + [\c!page=\v!no, + \c!click=\v!yes, + \c!display=\v!normal, + \c!focus=\v!fit, + \c!calculate=, + % rendering: + \c!width=1em, + \c!height=\zeropoint, + \c!depth=\zeropoint, + \c!symbolset=] + +%D We have to make sure of some settings: + +\def\scrn_reference_set_text_actions + {\iflocation + \edef\currentinteractionopenaction {\interactionparameter\c!openaction }% + \edef\currentinteractioncloseaction{\interactionparameter\c!closeaction}% + \ifx\currentinteractionopenaction\empty \else + \ctxcommand{setopendocumentaction("\currentinteractionopenaction")}% + \fi + \ifx\currentinteractioncloseaction\empty \else + \ctxcommand{setclosedocumentaction("\currentinteractioncloseaction")}% + \fi + \glet\scrn_reference_set_text_actions\relax + \fi} + +\def\scrn_reference_set_page_actions + {\iflocation + \edef\currentinteractionopenpageaction {\interactionparameter\c!openpageaction }% + \edef\currentinteractionclosepageaction{\interactionparameter\c!closepageaction}% + \ifx\currentinteractionopenpageaction\empty \else + \ctxcommand{setopenpageaction("\currentinteractionopenpageaction")}% + \fi + \ifx\currentinteractionclosepageaction\empty \else + \ctxcommand{setclosepageaction("\currentinteractionclosepageaction")}% + \fi + \fi} + +\appendtoks \scrn_reference_set_text_actions \to \everyshipout +\appendtoks \scrn_reference_set_page_actions \to \everyshipout + +%D delayed ... + +\def\scrn_reference_enable_references + {\ifproductionrun + \ctxlua{structures.references.enableinteraction()}% + \glet\scrn_reference_enable_references\relax + \fi} + +\appendtoks + \scrn_reference_enable_references +\to \everysetupinteraction + +\setupinteraction % start fit page and reset form + [\c!openaction=, + \c!closeaction=, + \c!openpageaction=, + \c!closepageaction=] + +\protect \endinput |