diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/scrn-ini.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/scrn-ini.mkvi | 78 |
1 files changed, 50 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/context/base/scrn-ini.mkvi b/Master/texmf-dist/tex/context/base/scrn-ini.mkvi index 860c696c0e8..daf0a1b911c 100644 --- a/Master/texmf-dist/tex/context/base/scrn-ini.mkvi +++ b/Master/texmf-dist/tex/context/base/scrn-ini.mkvi @@ -5,7 +5,7 @@ %D subtitle=Initialization, %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 @@ -27,14 +27,16 @@ %D %D \showsetup{setupinteraction} -\installcommandhandler\??ia{interaction}\??ia +\installcorenamespace{interaction} -\let\currentinteraction\empty +\installswitchcommandhandler \??interaction {interaction} \??interaction \appendtoks - \doifelse{\interactionparameter\c!state}\v!start - {\locationtrue \setsystemmode \v!interaction}% - {\locationfalse \resetsystemmode\v!interaction}% + \ifx\currentinteraction\previousinteraction + \doifelse{\interactionparameter\c!state}\v!start + {\locationtrue \setsystemmode \v!interaction}% + {\locationfalse \resetsystemmode\v!interaction}% + \fi \to \everysetupinteraction \def\doifelselocation @@ -85,6 +87,17 @@ \unexpanded\def\setinteraction[#1]% {\def\currentinteraction{#1}} +\defineinteraction % keep it simple + [\v!hidden] + +\setupinteraction + [\v!hidden] + [\c!state=\v!start, + \c!color=, + \c!contrastcolor=, + \c!style=, + \c!click=\v!off] + %D As long as there a natural feeling of what can be considered %D hyper active or not, we have to tell users where they can %D possibly click. We've already seen a few macros that deal @@ -107,46 +120,49 @@ %D When we're dealing with pure page references, contrast %D colors are used when we are already at the page mentioned. -\def\setlocationcolor#1% not grouped ! - {\ifnum\referencepagestate=\plusone - \edef\askedcontrastcolor{\csname#1\c!contrastcolor\endcsname}% +\unexpanded\def\setlocationcolorspecified#1% not grouped ! + {\ifnum#1=\plusone + \edef\askedcontrastcolor{\interactionparameter\c!contrastcolor}% \ifx\askedcontrastcolor\empty - \dosetcolorattribute{#1}\c!color + \useinteractioncolorparameter\c!color \else - \dosetcolorattribute{#1}\c!contrastcolor + \useinteractioncolorparameter\c!contrastcolor \fi \else % we could just set and if > 0 set again - \dosetcolorattribute{#1}\c!color + \useinteractioncolorparameter\c!color \fi} -\def\setlocationfont#1% - {\dosetfontattribute{#1}\c!style} - -\def\setlocationattributes#1% - {\ifnum\referencepagestate=\plusone - \edef\askedcontrastcolor{\csname#1\c!contrastcolor\endcsname}% +\unexpanded\def\setlocationattributesspecified#1% not grouped ! + {\ifnum#1=\plusone + \edef\askedcontrastcolor{\interactionparameter\c!contrastcolor}% \ifx\askedcontrastcolor\empty - \dosetcolorattribute{#1}\c!color + \useinteractionstyleandcolor\c!style\c!color \else - \dosetcolorattribute{#1}\c!contrastcolor + \useinteractionstyleandcolor\c!style\c!contrastcolor \fi \else % we could just set and if > 0 set again - \dosetcolorattribute{#1}\c!color - \fi - \dosetfontattribute{#1}\c!style} + \useinteractionstyleandcolor\c!style\c!color + \fi} -\def\setlocationcolorspec#1% \resolver - {\ifnum\referencepagestate=\plusone - \edef\askedcontrastcolor{#1\c!contrastcolor}% +\unexpanded\def\setlocationcolorspec#1#2% \resolver + {\ifnum#1=\plusone + \edef\askedcontrastcolor{#2\c!contrastcolor}% \ifx\askedcontrastcolor\empty - \doactivatecolor{#1\c!color}% + \doactivatecolor{#2\c!color}% \else \doactivatecolor\askedcontrastcolor \fi \else - \doactivatecolor{#1\c!color}% + \doactivatecolor{#2\c!color}% \fi} +\unexpanded\def\setlocationcolor {\setlocationcolorspecified \referencepagestate} +\unexpanded\def\setlocationattributes{\setlocationattributesspecified\referencepagestate} +\unexpanded\def\setlocationcolorspec {\setlocationcolorspecspecified \referencepagestate} + +\unexpanded\def\setlocationfont % not grouped ! + {\useinteractionstyleparameter\c!style} + \setupinteraction [\c!style=\v!bold, \c!color=interactioncolor, @@ -168,6 +184,12 @@ \scrn_identity_synchronize \to \everysetupinteraction +\appendtoks % not interfaced i.e. english + \doifvariable{document}{metadata:author}{\setupinteraction[author=\documentvariable{metadata:author}]}% + \doifvariable{document}{metadata:title}{\setupinteraction[title=\documentvariable{metadata:title}]}% + \doifvariable{document}{metadata:subject}{\setupinteraction[subject=\documentvariable{metadata:subject}]}% +\to \everysetupdocument + \setupinteraction [\c!title=, \c!subtitle=, |