ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* how to define a global color?
@ 2002-09-09  9:24 Uwe Koloska
  2002-09-09  9:54 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Koloska @ 2002-09-09  9:24 UTC (permalink / raw)


Hello,

how can I define a color inside of say an itemization?

If I say \definecolor[name][color] inside of an itemization, the 
definition is lost after the \stopitemize.

Is there something like a \global\definecolor?

Yours
Uwe Koloska

-- 
voiceINTERconnect www.voiceinterconnect.de
... smart speech applications from germany


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

* Re: how to define a global color?
  2002-09-09  9:24 how to define a global color? Uwe Koloska
@ 2002-09-09  9:54 ` Taco Hoekwater
  2002-09-09 11:18   ` Uwe Koloska
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2002-09-09  9:54 UTC (permalink / raw)
  Cc: ntg-context

Hi Uwe,

This has bitten me too, in the past. \global doesnt work
with definecolor.

Here is a rude, but reasonably safe solution (that is: it never caused 
any harm in my input files, but no warranty):

\globaldefs=1
\definecolor [...][]
\globaldefs=0

On Mon, 09 Sep 2002 11:24:20 +0200, Uwe wrote:

> Hello,
> 
> how can I define a color inside of say an itemization?
> 
> If I say \definecolor[name][color] inside of an itemization, the 
> definition is lost after the \stopitemize.
> 
> Is there something like a \global\definecolor?
> 
> Yours
> Uwe Koloska
> 
> -- 
> voiceINTERconnect www.voiceinterconnect.de
> ... smart speech applications from germany

-- 
groeten,

Taco


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

* Re: how to define a global color?
  2002-09-09  9:54 ` Taco Hoekwater
@ 2002-09-09 11:18   ` Uwe Koloska
  2002-09-11 17:45     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Koloska @ 2002-09-09 11:18 UTC (permalink / raw)


Hi Taco,

Taco Hoekwater schrieb:
> Hi Uwe,
> 
> This has bitten me too, in the past. \global doesnt work
> with definecolor.
> 
> Here is a rude, but reasonably safe solution (that is: it never caused 
> any harm in my input files, but no warranty):
> 
> \globaldefs=1
> \definecolor [...][]
> \globaldefs=0

very nice -- Thank you!  Works very well.

Uwe

-- 
voiceINTERconnect www.voiceinterconnect.de
.. smart speech applications from germany


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

* Re: how to define a global color?
  2002-09-09 11:18   ` Uwe Koloska
@ 2002-09-11 17:45     ` Hans Hagen
  2002-09-12  8:02       ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2002-09-11 17:45 UTC (permalink / raw)
  Cc: ntg-context

At 01:18 PM 9/9/2002 +0200, Uwe Koloska wrote:
>Hi Taco,
>
>Taco Hoekwater schrieb:
>>Hi Uwe,
>>This has bitten me too, in the past. \global doesnt work
>>with definecolor.
>>Here is a rude, but reasonably safe solution (that is: it never caused 
>>any harm in my input files, but no warranty):
>>\globaldefs=1
>>\definecolor [...][]
>>\globaldefs=0
>
>very nice -- Thank you!  Works very well.

as taco said, this can be rude (problematic), if really needed i can 
implement \doglobal\definecolor [nb: global must be applied several times 
inside definecolor]

just curious: why do you need to globally redefine colors? maybe a solution 
like

\definecolor[color-a][red]

\definecolor[color-b][color-a]

etc is better
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


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

* Re: how to define a global color?
  2002-09-11 17:45     ` Hans Hagen
@ 2002-09-12  8:02       ` Taco Hoekwater
  2002-09-18 12:58         ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2002-09-12  8:02 UTC (permalink / raw)


I need it for XML processing. Colors in my input are
encoded as hex values as in HTML, but they tend to be
the same over ander over again so I want to cache
the names somewhere (calling \definecolor all the time is
quite expensive). 

On Wed, 11 Sep 2002 23:15:41 +0530, Hans wrote:

> just curious: why do you need to globally redefine colors? maybe a solution 
> like

-- 
groeten,

Taco


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

* Re: how to define a global color?
  2002-09-12  8:02       ` Taco Hoekwater
@ 2002-09-18 12:58         ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2002-09-18 12:58 UTC (permalink / raw)
  Cc: ntg-context

At 06:32 AM 9/12/2002 +0200, Taco Hoekwater wrote:

>I need it for XML processing. Colors in my input are
>encoded as hex values as in HTML, but they tend to be
>the same over ander over again so I want to cache
>the names somewhere (calling \definecolor all the time is
>quite expensive).

ok, next version will have \defineglobalcolor (i can send you a new 
colo-ini if needed, also needs recent version due to color separation support)

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


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

end of thread, other threads:[~2002-09-18 12:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-09  9:24 how to define a global color? Uwe Koloska
2002-09-09  9:54 ` Taco Hoekwater
2002-09-09 11:18   ` Uwe Koloska
2002-09-11 17:45     ` Hans Hagen
2002-09-12  8:02       ` Taco Hoekwater
2002-09-18 12:58         ` Hans Hagen

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