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
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
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
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
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
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
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
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,
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
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
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')
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
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
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
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:
)
--
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
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)
17 matches
Mail list logo