diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/java-ini.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/java-ini.mkiv | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/context/base/java-ini.mkiv b/Master/texmf-dist/tex/context/base/java-ini.mkiv index 4013d82af51..e4f0bf28b4c 100644 --- a/Master/texmf-dist/tex/context/base/java-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/java-ini.mkiv @@ -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 @@ -110,10 +110,10 @@ \obeylualines \obeyluatokens \def\u{\letterbackslash u}% - \dostartJScode} + \java_start_code} -\long\def\dostartJScode#1\stopJScode - {\normalexpanded{\endgroup\ctxlua{interactions.javascripts.storecode(\!!bs#1\!!es)}}} +\def\java_start_code#1\stopJScode + {\normalexpanded{\endgroup\ctxcommand{storejavascriptcode(\!!bs#1\!!es)}}} \let\stopJScode\relax @@ -122,16 +122,15 @@ \obeylualines \obeyluatokens \def\u{\letterbackslash u}% - \dostartJSpreamble} + \java_start_preamble} -\long\def\dostartJSpreamble#1\stopJSpreamble - {\normalexpanded{\endgroup\ctxlua{interactions.javascripts.storepreamble(\!!bs#1\!!es)}}} +\def\java_start_preamble#1\stopJSpreamble + {\normalexpanded{\endgroup\ctxcommand{storejavascriptpreamble(\!!bs#1\!!es)}}} \let\stopJSpreamble\relax -\def\setJSpreamble #1#2{\ctxlua{interactions.javascripts.storepreamble ("#1",\!!bs#2\!!es)}} -\def\addtoJSpreamble #1#2{\ctxlua{interactions.javascripts.addtopreamble ("#1",\!!bs#2\!!es)}} -\def\douseJSpreamblenow#1{\ctxlua{interactions.javascripts.usepreamblenow("#1")}} +\unexpanded\def\setJSpreamble #1#2{\ctxcommand{storejavascriptpreamble("#1",\!!bs#2\!!es)}} +\unexpanded\def\addtoJSpreamble#1#2{\ctxcommand{addtojavascriptpreamble("#1",\!!bs#2\!!es)}} %D \macros %D {useJSscripts} @@ -148,11 +147,11 @@ %D %D The not so complicated implementation of this macro is: -\def\douseJSscripts[#1][#2]% - {\ctxlua{interactions.javascripts.usescripts(\!!bs#1\!!es)}% - \douseJSpreamblenow{#2}} - \def\useJSscripts - {\dodoubleempty\douseJSscripts} + {\dodoubleempty\java_use_scripts} + +\def\java_use_scripts[#1][#2]% + {\ctxcommand{usejavascriptscripts(\!!bs#1\!!es)}% two steps as this one calls tex code + \ctxcommand{usejavascriptpreamble("#2")}} % so this one comes later \protect \endinput |