On 7/8/2015 4:11 PM, Jaroslav Hajtmar wrote:
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}
why don't you define these commands at the tex level
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________