From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/69721 Path: news.gmane.org!not-for-mail From: Willi Egger Newsgroups: gmane.comp.tex.context Subject: Re: context.labeltext(...) Date: Mon, 4 Jul 2011 18:00:58 +0200 Message-ID: References: <3A06F342-571C-4790-B5F9-D3A63AC846A9@boede.nl> <8260169C-86E6-4DFA-BB4F-D353632FEE8F@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1309795278 14738 80.91.229.12 (4 Jul 2011 16:01:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2011 16:01:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 04 18:01:13 2011 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 1Qdla8-000754-IF for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jul 2011 18:01:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 78D47CADD7; Mon, 4 Jul 2011 18:01:07 +0200 (CEST) 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 EeAXdVJAEebv; Mon, 4 Jul 2011 18:01:04 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 69264CADD1; Mon, 4 Jul 2011 18:01:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B80BACADD1 for ; Mon, 4 Jul 2011 18:01:02 +0200 (CEST) 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 VSvCnEu+SKXZ for ; Mon, 4 Jul 2011 18:01:01 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id EB69ECAB80 for ; Mon, 4 Jul 2011 18:01:00 +0200 (CEST) Original-Received: from mars.digitpaint.nl (mars.digitpaint.nl [83.98.197.63]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p64G10uU023642 for ; Mon, 4 Jul 2011 18:01:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by mars.digitpaint.nl (Postfix) with ESMTP id CF333F1175 for ; Mon, 4 Jul 2011 18:00:59 +0200 (CEST) Original-Received: from mars.digitpaint.nl ([127.0.0.1]) by localhost (mail.digitpaint.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8bNqNXMpD8tL for ; Mon, 4 Jul 2011 18:00:59 +0200 (CEST) Original-Received: from willis-computer.fritz.box (a83-161-249-79.adsl.xs4all.nl [83.161.249.79]) by mars.digitpaint.nl (Postfix) with ESMTPA id 13B1CF1171 for ; Mon, 4 Jul 2011 18:00:59 +0200 (CEST) In-Reply-To: <8260169C-86E6-4DFA-BB4F-D353632FEE8F@googlemail.com> X-Mailer: Apple Mail (2.1084) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=83.98.197.63; 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: 0eF3Q10Xd - 208a9d731ee0 - 20110704 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:69721 Archived-At: Hello Wolfgang, thanks for your reply. I see that I was not quite clear with my explanation. The situation is the following: in a function which runs over the months of the year at a certain moment I need to insert at the ConTeXt side the monthname. However the monthname returned by the following statement is all lowercase, which is ok for the translation of the labeltext. In the document however I need the labeltext in with a starting uppercase letter. The question is therefor how to achieve this uppercase first letter \startluacode function monthtable(month) local direct = true local nofdays = converters.nofdays(os.date("%Y"),month,direct) direct = false local d = os.date("%B",os.time({year=os.date("%Y"),month= month,day=1})) context.bTABLE({setups="table:month"}) context.bTR({align="middle"}) context.bTD() context.labeltext(d) -- context.labeltext("%s",interfaces.variables.january) context.eTD() context.eTR() for i = 1, 31 do context.bTR() context.bTD() if i < nofdays +1 then context(i) else context() end context.eTD() context.eTR() end context.eTABLE() end \stopluacode \def\maandtabel#1{\ctxlua{monthtable(#1)}} \starttext \maandtabel{2) \stoptext Kind regards Willi On 4 Jul 2011, at 17:41, Wolfgang Schuster wrote: > context.labeltext("%s",interfaces.variables.january) ___________________________________________________________________________________ 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 ___________________________________________________________________________________