ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* return a labeltext with color...
@ 2022-06-24 14:34 Willi Egger via ntg-context
  2022-06-24 15:25 ` Wolfgang Schuster via ntg-context
  2022-06-24 17:19 ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 4+ messages in thread
From: Willi Egger via ntg-context @ 2022-06-24 14:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

Hi all,


Sorry for bothering you again.

I would like that lua is returning a colored string, which is a label-text.

The following does not work, the labeltext remains black, there is no error though:

return context.color({"red"},context.labeltext(s))

What is the correct approach?

Thanks for enlighten me :-)

Willi
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: return a labeltext with color...
  2022-06-24 14:34 return a labeltext with color Willi Egger via ntg-context
@ 2022-06-24 15:25 ` Wolfgang Schuster via ntg-context
  2022-06-24 17:19 ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-06-24 15:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Willi Egger via ntg-context
  Cc: Wolfgang Schuster, Willi Egger

Willi Egger via ntg-context schrieb am 24.06.2022 um 16:34:
> Hi all,
>
>
> Sorry for bothering you again.
>
> I would like that lua is returning a colored string, which is a label-text.
>
> The following does not work, the labeltext remains black, there is no error though:
>
> return context.color({"red"},context.labeltext(s))
>
> What is the correct approach?

\mainlanguage[fr]

\starttext

\startluacode
context.color( { "red" }, context.nested.labeltext("january") )
\stopluacode

\stoptext

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: return a labeltext with color...
  2022-06-24 14:34 return a labeltext with color Willi Egger via ntg-context
  2022-06-24 15:25 ` Wolfgang Schuster via ntg-context
@ 2022-06-24 17:19 ` Hans Hagen via ntg-context
  2022-06-24 18:31   ` Willi Egger via ntg-context
  1 sibling, 1 reply; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2022-06-24 17:19 UTC (permalink / raw)
  To: Willi Egger via ntg-context; +Cc: Hans Hagen

On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrote:
> Hi all,
> 
> 
> Sorry for bothering you again.
> 
> I would like that lua is returning a colored string, which is a label-text.
> 
> The following does not work, the labeltext remains black, there is no error though:
> 
> return context.color({"red"},context.labeltext(s))

context.color({"red"},function() context.labeltext(s) end)

> 
> What is the correct approach?
> 
> Thanks for enlighten me :-)
> 
> Willi
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: return a labeltext with color...
  2022-06-24 17:19 ` Hans Hagen via ntg-context
@ 2022-06-24 18:31   ` Willi Egger via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Willi Egger via ntg-context @ 2022-06-24 18:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Willi Egger

Hans, Wolfgang,

I am so happy to receive your immediate answers. — Thanks a lot, the problem is solved and I get the colored labeltext!

Thank you

Willi

> On 24 Jun 2022, at 19:19, Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:
> 
> On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrote:
>> Hi all,
>> Sorry for bothering you again.
>> I would like that lua is returning a colored string, which is a label-text.
>> The following does not work, the labeltext remains black, there is no error though:
>> return context.color({"red"},context.labeltext(s))
> 
> context.color({"red"},function() context.labeltext(s) end)
> 
>> What is the correct approach?
>> Thanks for enlighten me :-)
>> Willi
>> ___________________________________________________________________________________
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> 
> 
> -- 
> 
> -----------------------------------------------------------------
>                                         Hans Hagen | PRAGMA ADE
>             Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-24 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 14:34 return a labeltext with color Willi Egger via ntg-context
2022-06-24 15:25 ` Wolfgang Schuster via ntg-context
2022-06-24 17:19 ` Hans Hagen via ntg-context
2022-06-24 18:31   ` Willi Egger via ntg-context

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).