Re: [NTG-context] checking mainlanguage setup

2011-06-01 Thread Jeong Dalyoung
Dear Aditya, context([[\def\noexpand\Lang{...}]]) not working or context([[\def\string\Lang{...}]]) working I don't understand why context([[\def\\Lang{...}]]) working, too You are right. [[\def\\Lang{English}]] method works. I summerize it as a test file. The first 5

Re: [NTG-context] checking mainlanguage setup

2011-06-01 Thread Hans Hagen
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

Re: [NTG-context] checking mainlanguage setup

2011-06-01 Thread Hans Hagen
On 1-6-2011 10:14, Hans Hagen wrote: [[ ]] vs is a lua thing ... but when you pass things from within tex, expansions happens the same in both; you can try context(\detokenize{...}) Sorry, that should have been \ctxlua{\detokenize{...}} which takes care of things at the tex end. When at

Re: [NTG-context] checking mainlanguage setup

2011-06-01 Thread Wolfgang Schuster
Am 01.06.2011 um 09:45 schrieb Jeong Dalyoung: I summerize it as a test file. The first 5 methods are working well, but the last one using \noexpand cause the error. What exactly do you plan to do with the language check, for simple texts your method is overkill and labeltexts are better

Re: [NTG-context] checking mainlanguage setup

2011-05-31 Thread Procházka Lukáš Ing . - Pontex s . r . o .
On Sat, 28 May 2011 14:26:47 +0200, Jeong Dalyoung hak...@me.com wrote: context([[\\def\\lang{English}]]) It is not working. It just prints def langEnglish. BTW, are not there too many backslashes? Shouldn't it be (untested): context(\\def\\lang{English}) or

Re: [NTG-context] checking mainlanguage setup

2011-05-31 Thread Jeong Dalyoung
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

Re: [NTG-context] checking mainlanguage setup

2011-05-31 Thread Procházka Lukáš Ing . - Pontex s . r . o .
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

Re: [NTG-context] checking mainlanguage setup

2011-05-31 Thread Jeong Dalyoung
Dear Lukas, Thank you for the explanation. I guessed that your original [[\\def\\lang{English}]] No errors message, but it's not working as the way as I want. It just print def langEnglish. [[\def\lang{English}]] This cause the error message and halt the compiling. Best regards,

Re: [NTG-context] checking mainlanguage setup

2011-05-31 Thread Aditya Mahajan
On Wed, 1 Jun 2011, Jeong Dalyoung wrote: Dear Lukas, Thank you for the explanation. I guessed that your original [[\\def\\lang{English}]] No errors message, but it's not working as the way as I want. It just print def langEnglish. [[\def\lang{English}]] This cause the error

Re: [NTG-context] checking mainlanguage setup

2011-05-28 Thread Jeong Dalyoung
Dear Aditya, Here are the test result. context.setvalue(lang, English) It is working. context([[\\def\\lang{English}]]) It is not working. It just prints def langEnglish. Now, I got two solutions, using luacode and using \doifelse. Thank you. Best regards, Dalyoung

Re: [NTG-context] checking mainlanguage setup

2011-05-28 Thread Hans Hagen
On 28-5-2011 2:26, Jeong Dalyoung wrote: Dear Aditya, Here are the test result. context.setvalue(lang, English) It is working. context([[\\def\\lang{English}]]) It is not working. It just prints def langEnglish. context.language('en')

[NTG-context] checking mainlanguage setup

2011-05-27 Thread Jeong Dalyoung
Dear all, Is it possible to check what is the mainlanguage set in document? Now, I use \enablemode[kr] to do something A. But, I'd like to do it automatically if possible. For example, I'd like to do the following type of setup. if mainlanguage == kr then do something A elseif

Re: [NTG-context] checking mainlanguage setup

2011-05-27 Thread Pontus Lurcock
On Fri 27 May 2011, Jeong Dalyoung wrote: Is it possible to check what is the mainlanguage set in document? Now, I use \enablemode[kr] to do something A. But, I'd like to do it automatically if possible. According to http://wiki.contextgarden.net/Modes#System_modes , the mode **kr should be

Re: [NTG-context] checking mainlanguage setup

2011-05-27 Thread Marco
I'd like to do the following type of setup. if mainlanguage == kr then do something A elseif mainlanguage == en then do something B else do something C endif \starttext \startluacode if languages.current() == kr then context(Something A) elseif

Re: [NTG-context] checking mainlanguage setup

2011-05-27 Thread Peter Münster
On Fri, May 27 2011, Jeong Dalyoung wrote: Is it possible to check what is the mainlanguage set in document? Yes. Example: %\mainlanguage[fr] %\language[fr] \starttext currentlanguage: \doifelse\currentlanguage{fr}{French}{Not French}\par currentmainlanguage:

Re: [NTG-context] checking mainlanguage setup

2011-05-27 Thread Jeong Dalyoung
) -- Message: 1 Date: Fri, 27 May 2011 22:11:24 +1200 From: Pontus Lurcock p...@talvi.net To: ntg-context@ntg.nl Subject: Re: [NTG-context] checking mainlanguage setup Message-ID: 20110527101124.go20...@rae.vm.bytemark.co.uk Content-Type: text/plain; charset=us

Re: [NTG-context] checking mainlanguage setup

2011-05-27 Thread Aditya Mahajan
On Sat, 28 May 2011, Jeong Dalyoung wrote: \startluacode if languages.current() == kr then context([[\def\lang{Korean}]]) %(\def\lang{Korean}) else context([[\def\lang{English}]]) %(\def\lang{Korean}) end \stopluacode currentlanguage: \lang is not working. (undifined control sequence error)