diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-23 23:38:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-23 23:38:05 +0000 |
commit | 60f28f85f2707b6a48c3b5aec0ea68b8ee21e466 (patch) | |
tree | ab34d8d573457bea6a804ee3d5de48dd500bf028 /Master/texmf-dist/tex/context/base/file-mod.mkvi | |
parent | ac5882d0cb115e11b5cc2e62107ef5822f3507f5 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@30865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/file-mod.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/file-mod.mkvi | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/file-mod.mkvi b/Master/texmf-dist/tex/context/base/file-mod.mkvi index 92b8a895940..0dbd14bdbe9 100644 --- a/Master/texmf-dist/tex/context/base/file-mod.mkvi +++ b/Master/texmf-dist/tex/context/base/file-mod.mkvi @@ -238,6 +238,52 @@ \unexpanded\def\doifolderversionelse#parent#child{\ctxcommand{doifolderversionelse("#parent","#child")}} \unexpanded\def\doifoldercontextelse #child{\ctxcommand{doifolderversionelse("#child")}} +%D Relatively new: + +\unexpanded\def\syst_modules_direct_lua#1#2% + {\edef\m_module_command_command {#1}% + \edef\m_module_command_function{#2}% + \directsetup{module:\m_module_command_command:start}% + \ctxlua{\m_module_command_function()}% + \directsetup{module:\m_module_command_command:stop}} + +\unexpanded\def\syst_modules_single_lua#1#2% + {\edef\m_module_command_command {#1}% + \edef\m_module_command_function{#2}% + \dosingleempty\syst_modules_single_lua_indeed} + +\unexpanded\def\syst_modules_single_lua_indeed[#1]% + {\directsetup{module:\m_module_command_command:start}% + \ctxlua{\m_module_command_function(\!!bs#1\!!es)}% + \directsetup{module:\m_module_command_command:stop}} + +\unexpanded\def\syst_modules_double_lua#1#2% + {\edef\m_module_command_command {#1}% + \edef\m_module_command_function{#2}% + \dodoubleempty\syst_modules_double_lua_indeed} + +\unexpanded\def\syst_modules_double_lua_indeed[#1][#2]% + {\directsetup{module:\m_module_command_command:start}% + \ctxlua{\m_module_command_function(\!!bs#1\!!es,\!!bs#2\!!es)}% + \directsetup{module:\m_module_command_command:stop}} + +\def\installmodulecommandlua #1#2{\unexpanded\def#1{\normalexpanded{\syst_modules_direct_lua{\strippedcsname#1}{#2}}}} +\def\installmodulecommandluasingle#1#2{\unexpanded\def#1{\normalexpanded{\syst_modules_single_lua{\strippedcsname#1}{#2}}}} +\def\installmodulecommandluadouble#1#2{\unexpanded\def#1{\normalexpanded{\syst_modules_double_lua{\strippedcsname#1}{#2}}}} + +\unexpanded\def\syst_modules_one_lua#1#2#3% + {\directsetup{module:#1:start}% + \ctxlua{#2(\!!bs#3\!!es)}% + \directsetup{module:#1:stop}} + +\unexpanded\def\syst_modules_two_lua#1#2#3#4% + {\directsetup{module:#1:start}% + \ctxlua{#2(\!!bs#3\!!es,\!!bs#4\!!es)}% + \directsetup{module:#1:stop}} + +\def\installmodulecommandluaone #1#2{\unexpanded\def#1{\normalexpanded{\syst_modules_one_lua {\strippedcsname#1}{#2}}}} +\def\installmodulecommandluatwo #1#2{\unexpanded\def#1{\normalexpanded{\syst_modules_two_lua {\strippedcsname#1}{#2}}}} + % obsolete % % \def\documentresources{\@@erurl} |