[NTG-context] checking mainlanguage setup

Hans Hagen pragma at wxs.nl
Wed Jun 1 10:14:53 CEST 2011


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 <haksan at 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
-----------------------------------------------------------------


More information about the ntg-context mailing list