Hi, Thank you very much for the explanation, now it's clear to me! Regards, Verhaag, G.C.H.M. On 04/24/2013 12:20 AM, Wolfgang Schuster wrote:
Am 23.04.2013 um 20:11 schrieb "Verhaag, G.C.H.M."
: Hi Luigi,
Thanks for your very quick response, just great! Your suggestion works!
By the way, what does this expanded mean, is it documented somewhere? Is it a typical MKIV thing related to Lua?
It’s a typical way in MkIV to check for the existing of values in “command” keys but it has nothing to do with Lua.
I can demonstrate the purpose of \unexpanded with the following example. First I create the two command \one and \two, afterwards I add \expandedone and \expandedtwo which hold the expanded values of \one and \two.
As you can see I get the same text with \one and \expandedone. In the next step I redefine \one and \two to hold a new value and compare again the content of all four macros. Unlike in the previous output \one and \expandedone are different while \two and \expandedtwo show the same result. The reason why \expandedtwo show “Second” is that \unexpanded\def prevented the expansion of \two in \edef\expandedtwo{…}.
\starttext
\def\one{One} \unexpanded\def\two{Two}
\edef\expandedone{\one} \edef\expandedtwo{\two}
\startlines \one:\expandedone \two:\expandedtwo \stoplines
\def\one{First} \def\two{Second}
\startlines \one:\expandedone \two:\expandedtwo \stoplines
\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 ___________________________________________________________________________________