diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/java-ini.mkiv | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/java-ini.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/java-ini.mkiv | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/Master/texmf-dist/tex/context/base/java-ini.mkiv b/Master/texmf-dist/tex/context/base/java-ini.mkiv deleted file mode 100644 index d6fe4dd8a05..00000000000 --- a/Master/texmf-dist/tex/context/base/java-ini.mkiv +++ /dev/null @@ -1,159 +0,0 @@ -%D \module -%D [ file=java-ini, -%D version=1998.01.30, -%D title=\CONTEXT\ JavaScript Macros, -%D subtitle=Initialization, -%D author=Hans Hagen, -%D date=\currentdate, -%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 -%C details. - -\writestatus{loading}{ConTeXt JavaScript Macros / Initialization} - -\registerctxluafile{java-ini}{1.001} - -\unprotect - -%D \macros -%D {JS*} -%D -%D Because \JAVASCRIPT's are activated by the user, for -%D instance by activating on a button, their support is closely -%D related to the referencing mechanism. Integration takes -%D place by -%D -%D \starttyping -%D \goto{calculate total}[Sum()] -%D \stoptyping -%D -%D The \type{()} classify this as a script. If they are absent, -%D the keyword is treated as a normal reference. -%D -%D One can pass arguments to such a script by saying: -%D -%D \starttyping -%D \goto{calculate total}[Sum(1.5,2.3)] -%D \stoptyping - - -%D \macros -%D {startJScode} -%D -%D A piece of \JAVASCRIPT\ code is defined by saying: -%D -%D \starttyping -%D \startJScode{name} -%D name = 4 ; -%D \stopJScode -%D \stoptyping -%D -%D This assumes uses no preamble or presumes that the preamble is -%D always loaded, the next definition also tells \CONTEXT\ to -%D actually include the preamble needed. -%D -%D \starttyping -%D \startJScode{uses} uses {later} -%D uses = 6 ; -%D \stopJScode -%D \stoptyping -%D -%D \macros -%D {startJSpreamble} -%D -%D One can define insert \JAVASCRIPT\ code at the document level -%D by using: -%D -%D \starttyping -%D \startJSpreamble{oeps} -%D oeps = 1 ; -%D \stopJSpreamble -%D \stoptyping -%D -%D which is the same as: -%D -%D \starttyping -%D \startJSpreamble{now} used now -%D now = 2 ; -%D \stopJSpreamble -%D \stoptyping -%D -%D while the next definition is only included when actually -%D used. -%D -%D \starttyping -%D \startJSpreamble{later} used later -%D later = 3 ; -%D \stopJSpreamble -%D \stoptyping -%D -%D This command may be used more that once, but always before -%D the first page is shipped out. -%D -%D \macros -%D {setJSpreamble, addtoJSpreamble} -%D -%D In addition to the previous preamble definitions, we can -%D set a preamble \quote {in||line} and add tokens to a -%D preamble. -%D -%D \macros -%D {useJSpreamblenow} -%D -%D This macro can be used to force inclusion of postponed -%D \JAVASCRIPT\ preambles. - -\def\m_java_escape_u{\letterbackslash u} - -\unexpanded\def\startJScode - {\begingroup - \obeylualines - \obeyluatokens - \let\u\m_java_escape_u - \java_start_code} - -\def\java_start_code#1\stopJScode - {\normalexpanded{\endgroup\clf_storejavascriptcode{#1}}} - -\let\stopJScode\relax - -\unexpanded\def\startJSpreamble - {\begingroup - \obeylualines - \obeyluatokens - \let\u\m_java_escape_u - \java_start_preamble} - -\def\java_start_preamble#1\stopJSpreamble - {\normalexpanded{\endgroup\clf_storejavascriptpreamble{#1}}} - -\let\stopJSpreamble\relax - -\unexpanded\def\setJSpreamble #1#2{\clf_setjavascriptpreamble {#1}{#2}} -\unexpanded\def\addtoJSpreamble#1#2{\clf_addtojavascriptpreamble{#1}{#2}} - -%D \macros -%D {useJSscripts} -%D -%D In due time, users will build their collections of scripts, -%D which can be used (loaded) when applicable. Although not all -%D public, we will provide some general purpose scripts, -%D collected in files with names like \type{java-...}. One can -%D load these scripts with \type{\useJSscripts}, like: -%D -%D \starttyping -%D \useJSscripts[fld] -%D \stoptyping -%D -%D The not so complicated implementation of this macro is: - -\unexpanded\def\useJSscripts - {\dodoubleempty\java_use_scripts} - -\def\java_use_scripts[#1][#2]% - {\clf_usejavascriptscripts {#1}% two steps as this one calls tex code - \clf_usejavascriptpreamble{#2}}% so this one comes later - -\protect \endinput |