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
___________________________________________________________________________________

Reply via email to