Am 20.03.2013 um 14:26 schrieb H. van der Meer
There is a nasty problem when defining the \date.
First approach: *** > macro:->\date \def\thedate{\date}\writestatus{***}{\meaning\thedate} Alas, I get lateron a luatex error on \date: ! LuaTeX error [string "\directlua "]:1: invalid escape sequence near '\d'.
Second approach, use \edef to get an expanded value. \edef\thedate{\date}\writestatus{***}{\meaning\thedate} *** > macro:->\date Alas, the date is still the unexpanded macro and not something like 20 march 2013.
How to?
All commands with optional argument aren’t expandable and \date *has* two optional argument. To get now the date in the output you can either use the expandable \rawdate[] command (the brackets are necessary) or you use \ctxcommand{currentdate(<specification>,<language>)} (language can also be "false"). Wolfgang