On 31-5-2011 4:33, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
On Tue, 31 May 2011 12:45:00 +0200, Jeong Dalyoung <hak...@me.com> wrote:
Dear Lucas,
Shouldn't it be (untested):
context("\\def\\lang{English}")
It is working.
context([[\def\lang{English}]])
It is not working. It prints "def lang English".
Thank you.
Best regards,
Dalyoung
OK.
I meant just the way how strings in Lua are entered
- if inside quotation marks, escaping is required, thus "\\" yields to
backslash,
- if inside [[ ... ]], single \ gives backslash, and of course \\ gives
TWO backslashes.
I guessed that your original
[[\\def\\lang{English}]]
could have caused the problem, so I corrected it to
[[\def\lang{English}]]
[[ ]] vs " " is a lua thing ... but when you pass things from within
tex, expansions happens the same in both; you can try
context("\detokenize{...}")
-----------------------------------------------------------------
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 : 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
___________________________________________________________________________________