On Thu, 25 Nov 2010 14:22:18 +0100, Taco Hoekwater <t...@elvenkind.com> 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 solution will not work if you put it in a separate lua file: you have to convert it to a lua function in that case that takes \currentmainlanguage as an argument.
... And using this in a separate file is also what I'd need. So do I have to do something like: --- A.mkiv \startluacode function currentmainlanguage() return "\currentmainlanguage" end -- Or: the_currentmainlanguage = "\currentmainlanguage" dofile("A.lua") \stopluacode --- And: --- A.lua if currentmainlanguage() == "cs" then -- Or: if the_currentmainlanguage = "cs" then -- Something end --- OK? (Suggestion: Wouldn't be nice to have function(s) or variable(s) like e.g. 'context.environment["currentmainlanguage"]' or something like this?) Best regards, Lukas (To Taco: Sorry, I sent the same message to your private address first.) ___________________________________________________________________________________ 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 ___________________________________________________________________________________