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 <w.eg...@boede.nl> 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
___________________________________________________________________________________

Reply via email to