From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/69722 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:05:01 +0200 Message-ID: References: <3A06F342-571C-4790-B5F9-D3A63AC846A9@boede.nl> 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 1309795525 15988 80.91.229.12 (4 Jul 2011 16:05:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2011 16:05:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 04 18:05:20 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 1QdleC-0000EA-8m for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jul 2011 18:05:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5BFDBCADD5; Mon, 4 Jul 2011 18:05:19 +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 DWJzILALQz5d; Mon, 4 Jul 2011 18:05:16 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5374FCADD1; Mon, 4 Jul 2011 18:05:16 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0942FCADD1 for ; Mon, 4 Jul 2011 18:05:15 +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 gO1uhLuE1aG2 for ; Mon, 4 Jul 2011 18:05:03 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 59E6DCAB80 for ; Mon, 4 Jul 2011 18:05:03 +0200 (CEST) Original-Received: from mars.digitpaint.nl (mars.digitpaint.nl [83.98.197.63]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p64G511b008259 for ; Mon, 4 Jul 2011 18:05:02 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by mars.digitpaint.nl (Postfix) with ESMTP id A3C96F118A for ; Mon, 4 Jul 2011 18:05:01 +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 3sfl0SDPNg79 for ; Mon, 4 Jul 2011 18:05:01 +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 73379ECDC4 for ; Mon, 4 Jul 2011 18:05:01 +0200 (CEST) In-Reply-To: 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: 06F3Q51x5 - 09077d2ec4ea - 20110704 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:69722 Archived-At: Hi Luigi, hm, did not know this one. Still I can not see that this is going to fit in my situation. I refer to may other mail I sent a minute ago. - The thing is, that the document I am building should be multilingual and therefore I need at the lua-end the lowercase text which should be made first-letter-uppercase at the moment it is typeset. Thanks Willi On 4 Jul 2011, at 17:54, luigi scarso wrote: > On Mon, Jul 4, 2011 at 5:02 PM, Willi Egger wrote: >> Hi all, >> >> experimenting with context.labeltext... >> >> My question is how can I tweak the context.labeltext(text) command at the lua-side to make ConTeXt to typeset the labeltext starting with an uppercase letter? e.g. if "text" contains "january" to display "January"? > And if text is foo you want Foo ? > In char-ini.lua, among others, there is > function characters.upper(str) > local new, n = { }, 0 > for u in utfvalues(str) do > n = n + 1 > new[n] = ucchars[u] > end > return concat(new) > end > The idea is to take the first character from characters.upper(str), > and all but not first from str > and then join them using concat. > > -- > luigi > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________