Am 17.07.2011 um 15:10 schrieb Jaroslav Hajtmar: > then it's not for me very good news, because I thus probably not my module to > process only at the Lua language ...
You can’t expand macro from Lua but the following is possible: \startluacode values = { I = "1", II = "2", } function test(arg) if string.find(arg,"\\macro") then arg = string.gsub(arg,"\\macro","") if values[arg] then context(values[arg]) else context("Invalid index.") end else context("Invalid command.") end end \stopluacode \starttext \starttabulate \NC \type{\macroI} \EQ \ctxlua{test("\\macroI")} \NC\NR \NC \type{\macroII} \EQ \ctxlua{test("\\macroII")} \NC\NR \NC \type{\macroIII} \EQ \ctxlua{test("\\macroIII")} \NC\NR \NC \type{\foo} \EQ \ctxlua{test("\\foo")} \NC\NR \stoptabulate \stoptext Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________