ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <w.egger@boede.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: context.labeltext(...)
Date: Mon, 4 Jul 2011 18:05:01 +0200	[thread overview]
Message-ID: <DF3112F5-EB97-4DB6-BCF6-1752E3BC570A@boede.nl> (raw)
In-Reply-To: <CAG5iGsDxBTGtu7JyzBP0QfS4ihYQgKKe5VfUrKY-YOrL19bNuQ@mail.gmail.com>

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.egger@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	other threads:[~2011-07-04 16:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 15:02 context.labeltext(...) Willi Egger
2011-07-04 15:41 ` context.labeltext(...) Wolfgang Schuster
2011-07-04 16:00   ` context.labeltext(...) Willi Egger
2011-07-04 16:12     ` context.labeltext(...) Wolfgang Schuster
2011-07-04 15:54 ` context.labeltext(...) luigi scarso
2011-07-04 16:05   ` Willi Egger [this message]
2011-07-04 16:14     ` context.labeltext(...) Wolfgang Schuster
2011-07-04 16:20     ` context.labeltext(...) luigi scarso
2011-07-04 16:53       ` context.labeltext(...) Khaled Hosny
2011-07-04 17:02         ` context.labeltext(...) Wolfgang Schuster
2011-07-05  7:22         ` context.labeltext(...) Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DF3112F5-EB97-4DB6-BCF6-1752E3BC570A@boede.nl \
    --to=w.egger@boede.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).