On 11/25/2010 04:57 PM, Hans Hagen wrote:
however, tex does not privide access to the current language
It does: \ctxlua{print(tex.language)}
___
If your question is of interest to others as well, please add an en
On 25-11-2010 4:13, Taco Hoekwater wrote:
On 11/25/2010 02:43 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
... And using this in a separate file is also what I'd need. So do I
have to do something like:
Something like that, yes. But it depends a little on what you
want to do: because \cur
On 11/25/2010 02:43 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
... And using this in a separate file is also what I'd need. So do I
have to do something like:
Something like that, yes. But it depends a little on what you
want to do: because \currentmainlanguage expands, you will
get the
On Thu, 25 Nov 2010 14:22:18 +0100, Taco Hoekwater wrote:
On 11/25/2010 02:16 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
No, nothing as complicated as that: \currentmainlanguage is an
expandable macro, so it simply expands to its actual content: cs
This also means that my proposed so
On 11/25/2010 02:16 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
So does it mean that "\" (in the beginning of a string) in Lua for
ConTeXt is a "hack" which expands a (Con)TeX(t) internal value (in the
case that is not a valid escape char)?
No, nothing as complicated as that: \currentma
... Thanks to both. So -
On Thu, 25 Nov 2010 13:31:36 +0100, Taco Hoekwater wrote:
On 11/25/2010 01:13 PM, Wolfgang Schuster wrote:
Am 25.11.2010 um 12:49 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
how to determine the current language being used in Ctx source via Lua? I mean
On 11/25/2010 01:13 PM, Wolfgang Schuster wrote:
Am 25.11.2010 um 12:49 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
how to determine the current language being used in Ctx source via Lua? I mean
soumething like:
---
\mainlanguage[cz]
\starttext
AAA
\startluacode
if
Am 25.11.2010 um 12:49 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
> Hello,
>
> how to determine the current language being used in Ctx source via Lua? I
> mean soumething like:
>
> ---
> \mainlanguage[cz]
>
> \starttext
> AAA
>
> \startluacode
>if context.mainlanguage == "cz"
Hello,
how to determine the current language being used in Ctx source via Lua? I mean
soumething like:
---
\mainlanguage[cz]
\starttext
AAA
\startluacode
if context.mainlanguage == "cz" then -- Do something specific
context("Ahoj!")
elseif context.mainlanguage == "en" th