diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
commit | d7ccb42582f85acf30568913610ccf4d602023fb (patch) | |
tree | 7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/syst-lua.mkiv | |
parent | 2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff) |
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-lua.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/syst-lua.mkiv | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-lua.mkiv b/Master/texmf-dist/tex/context/base/syst-lua.mkiv index 40cd9f75685..3ed70cc0b77 100644 --- a/Master/texmf-dist/tex/context/base/syst-lua.mkiv +++ b/Master/texmf-dist/tex/context/base/syst-lua.mkiv @@ -15,15 +15,15 @@ \unprotect -\def\expdoifelse#1#2{\ctxlua{commands.doifelse(\!!bs#1\!!es==\!!bs#2\!!es)}} -\def\expdoif #1#2{\ctxlua{commands.doif (\!!bs#1\!!es==\!!bs#2\!!es)}} -\def\expdoifnot #1#2{\ctxlua{commands.doifnot (\!!bs#1\!!es==\!!bs#2\!!es)}} +\def\expdoifelse#1#2{\ctxcommand{doifelse(\!!bs#1\!!es==\!!bs#2\!!es)}} +\def\expdoif #1#2{\ctxcommand{doif (\!!bs#1\!!es==\!!bs#2\!!es)}} +\def\expdoifnot #1#2{\ctxcommand{doifnot (\!!bs#1\!!es==\!!bs#2\!!es)}} % \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3 % \testfeatureonce{100000}{\expandabledoifelse{hello world}{here i am}{}} % 1.5 -\def\expdoifcommonelse#1#2{\ctxlua{commands.doifcommonelse("#1","#2")}} -\def\expdoifinsetelse #1#2{\ctxlua{commands.doifinsetelse("#1","#2")}} +\def\expdoifcommonelse#1#2{\ctxcommand{doifcommonelse("#1","#2")}} +\def\expdoifinsetelse #1#2{\ctxcommand{doifinsetelse("#1","#2")}} % we define these here, just in case ... @@ -32,6 +32,12 @@ \edef\!!bs{[\luastringsep[} \edef\!!es{]\luastringsep]} -\def\writestatus#1#2{\ctxlua{commands.writestatus(\!!bs#1\!!es,\!!bs#2\!!es)}} +\def\writestatus#1#2{\ctxcommand{writestatus(\!!bs#1\!!es,\!!bs#2\!!es)}} + +% a handy helper (we can probably omit the tex.ctxcatcodes here as nowadays we seldom +% change the regime at the tex end + +%def\luaexpr#1{\ctxlua {tex.sprint(tex.ctxcatcodes,tostring(#1))}} +\def\luaexpr#1{\directlua\zerocount{tex.sprint(tex.ctxcatcodes,tostring(#1))}} % wrap in global function ? \protect \endinput |