From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63924 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Ctx & Lua: determination of the language being used Date: Thu, 25 Nov 2010 16:13:52 +0100 Message-ID: <4CEE7D30.4090405@elvenkind.com> References: <4CEE5728.4010706@elvenkind.com> <4CEE630A.1060407@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1290698062 3236 80.91.229.12 (25 Nov 2010 15:14:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Nov 2010 15:14:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 25 16:14:18 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PLdWc-0008Tz-0P for gctc-ntg-context-518@m.gmane.org; Thu, 25 Nov 2010 16:14:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B19C5CA87B; Thu, 25 Nov 2010 16:14:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ezNfI8IVvIeD; Thu, 25 Nov 2010 16:14:13 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A49DCA87E; Thu, 25 Nov 2010 16:14:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 19EC0CA87E for ; Thu, 25 Nov 2010 16:14:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AlDrSOco-GR7 for ; Thu, 25 Nov 2010 16:14:01 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 93144CA87B for ; Thu, 25 Nov 2010 16:14:01 +0100 (CET) Original-Received: from smtp-vbr16.xs4all.nl (smtp-vbr16.xs4all.nl [194.109.24.36]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAPFE0P1017243 for ; Thu, 25 Nov 2010 16:14:01 +0100 Original-Received: from boo.fritz.box (boo.demon.nl [83.163.247.99]) (authenticated bits=0) by smtp-vbr16.xs4all.nl (8.13.8/8.13.8) with ESMTP id oAPFDqvL096300; Thu, 25 Nov 2010 16:13:52 +0100 (CET) (envelope-from taco@elvenkind.com) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101030 Mandriva/3.1.6-1mdv2011.0 (2011.0) Thunderbird/3.1.6 In-Reply-To: X-Virus-Scanned: by XS4ALL Virus Scanner X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=194.109.24.36; country=NL; latitude=52.5000; longitude=5.7500; http://maps.google.com/maps?q=52.5000,5.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rDzre1PB - 254be7211674 - 20101125 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63924 Archived-At: On 11/25/2010 02:43 PM, Proch=E1zka Luk=E1=B9 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 value that is active during the first scan of the lua code block, which may not be what you want, but it is hard to judge without the actual use case. > (Suggestion: Wouldn't be nice to have function(s) or variable(s) like > e.g. 'context.environment["currentmainlanguage"]' or something like this?) Yes, agreed, something like that would be useful. The same applies to some other things, like color and active modes. Some of these are probably there already, but it would be nice if they were documented. Best wishes, Taco ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________