Thanks Taco very much. At this point, it really works in simple situations, but in the event that this solution will incorporate into the existing system, then I have big problems with expansion (values are not updated in macros). I need more solutions using something like context.setgvalue, or at least according to the following example. If they could incorporate the remaining two definitions ie \def\simpleA {content when parameter is missing} \def\complexA[#1]{parameter #1} into luacode (probably encounter a problem with #), so it might work. Can not think of anyone, how it could be done differently? Thanks Jaroslav Hajtmar Here is minimal example: \ctxlua{ xlsname='A' content='content when parameter is missing' context([[\definecomplexorsimple\]]..xlsname) %context([[\def\simple]]..xlsname..[[{]]..content..[[}]]) %context([[\def\complex]]..xlsname..'[#1]'..[[{Neco: #1}]]) } \def\simpleA {content when parameter is missing} \def\complexA[#1]{parameter #1} \type{\A}: \A \type{\A[5]}: \A[5] \stoptext Dne 8. 7. 2015 v 14:11 Taco Hoekwater napsal(a):
On 08 Jul 2015, at 13:58, Jaroslav Hajtmar
wrote: Thanx Taco for reply.
the minimal example see bellow not crashed, but \A macro is not created. I don't Know in what could still be a problem. Example I am even more minimalize It works for me after changing \directlua {} to \startluacode … \stopluacode
Best wishes, Taco