Re: [NTG-context] colors without \definecolor

2010-02-08 Thread Mojca Miklavec
On Sun, Feb 7, 2010 at 22:56, Wolfgang Schuster wrote:
 Am 07.02.10 07:24, schrieb Aditya Mahajan:

 while \color can only be used as

 \color[rgb]{...}.

 No. Both \color[rgb]{...} and {\color[rgb]...} are valid

 D’oh. I looked in the source and missed this but I wonder
 if this had been always the case because the manuals
 {and the wiki) mention only \color[name]{...}.

\colored is a rather recent command.

Mojca
___
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
___


Re: [NTG-context] colors without \definecolor

2010-02-08 Thread Hans Hagen

On 7-2-2010 22:56, Wolfgang Schuster wrote:

Am 07.02.10 07:24, schrieb Aditya Mahajan:

while \color can only be used as

\color[rgb]{...}.

No. Both \color[rgb]{...} and {\color[rgb]...} are valid

D’oh. I looked in the source and missed this but I wonder
if this had been always the case because the manuals
{and the wiki) mention only \color[name]{...}.


all commands that use \groupedcommand have that property


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] colors without \definecolor

2010-02-08 Thread Wolfgang Schuster

Am 08.02.10 09:19, schrieb Mojca Miklavec:


D’oh. I looked in the source and missed this but I wonder
if this had been always the case because the manuals
(and the wiki) mention only \color[name]{...}.


\colored is a rather recent command.


I meant the manuals and wiki mention \color[name]{...}
but not the form {\color[...]...}.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] colors without \definecolor

2010-02-08 Thread Wolfgang Schuster

Am 08.02.10 09:40, schrieb Hans Hagen:


D’oh. I looked in the source and missed this but I wonder
if this had been always the case because the manuals
{and the wiki) mention only \color[name]{...}.


all commands that use \groupedcommand have that property


But used \color always \groupedcommand or was this added later and the 
original definition was what is mentioned in the manual (\color[]{})?


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] colors without \definecolor

2010-02-08 Thread Hans Hagen

On 8-2-2010 9:55, Wolfgang Schuster wrote:

Am 08.02.10 09:40, schrieb Hans Hagen:


D’oh. I looked in the source and missed this but I wonder
if this had been always the case because the manuals
{and the wiki) mention only \color[name]{...}.


all commands that use \groupedcommand have that property


But used \color always \groupedcommand or was this added later and the
original definition was what is mentioned in the manual (\color[]{})?


it's a very old command so it might not have used groupedcommand in the past

also, at the time of manual writing no groupedcommand like things were 
there anyway


but .. there's another reason ...

\color{...} does not grab an argument but does some aftergroup trickery 
so it might not work in all cases


also in mkii we inject literals and we could end up with dangling revert 
color cases being nodes that could interfere somehow


mkiv is more robust

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] colors without \definecolor

2010-02-07 Thread Wolfgang Schuster

Am 07.02.10 07:24, schrieb Aditya Mahajan:

while \color can only be used as

\color[rgb]{...}.

No. Both \color[rgb]{...} and {\color[rgb]...} are valid

D’oh. I looked in the source and missed this but I wonder
if this had been always the case because the manuals
{and the wiki) mention only \color[name]{...}.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] colors without \definecolor

2010-02-06 Thread Aditya Mahajan

On Sat, 6 Feb 2010, Wolfgang Schuster wrote:


Am 05.02.10 15:49, schrieb Philipp Gesang:


Is there a difference (other than
syntax) between \colored[rgb] and the according \definecolor[name][rgb]
-- \color[name] commands?


No, \colored is \definecolor + \color except you can use it in the form

\colored[rgb]{...}

and

{\colored[rgb]...}

while \color can only be used as

\color[rgb]{...}.


No. Both \color[rgb]{...} and {\color[rgb]...} are valid

\definecolor[myred][r=0.65]

\starttext
{normal text \color[myred]{red text} normal text}

{normal text {\color[myred]red text} normal text}
\stoptext

Aditya
___
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
___


Re: [NTG-context] colors without \definecolor

2010-02-05 Thread Philipp Gesang
Wolfgang, all,
On 2010-02-05 08:31:35, Wolfgang Schuster wrote:
 \colored[r=...,g=...,b=...]{...}
 or
 {\colored[r=...,g=...,b=...]...}
Thank you very much, I wikified it.  Is there a difference (other than
syntax) between \colored[rgb] and the according \definecolor[name][rgb]
-- \color[name] commands?

Philipp


pgpeYNdmcwSZk.pgp
Description: PGP signature
___
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
___


Re: [NTG-context] colors without \definecolor

2010-02-05 Thread Wolfgang Schuster

Am 05.02.10 15:49, schrieb Philipp Gesang:


Is there a difference (other than
syntax) between \colored[rgb] and the according \definecolor[name][rgb]
-- \color[name] commands?


No, \colored is \definecolor + \color except you can use it in the form

\colored[rgb]{...}

and

{\colored[rgb]...}

while \color can only be used as

\color[rgb]{...}.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] colors without \definecolor

2010-02-04 Thread Wolfgang Schuster

Am 04.02.10 21:41, schrieb Philipp Gesang:

Hi all,


I understand that in order to use a color with \color[somecolor]{colored
text} I first have to \definecolor[somecolor][r=.4,g=0,b=1].  Currently
I'm trying to do automated colorizing with the help of some lua code and
I'd like to make up rgb vectors on the spot without having to
\definecolor them first, e.g. something like \color[r=.4,g=0,b=1]
{colored text}.  Is there a way to achieve this in mkiv?  (Right now I'm
assigning new rgb values to the same color name whenever the function
is called that concatenates the next \color[]{} statement.  This seems a
bit verbose and hacky to me.)


\colored[r=...,g=...,b=...]{...}

or

{\colored[r=...,g=...,b=...]...}

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___