On Tue, 5 Jul 2016 10:21:48 +0200, Hans Hagen <[email protected]> wrote:
> On 7/5/2016 9:25 AM, Christoph Reller wrote:
>> Dear List,
>>
>> I use the latest version of ConTeXt and I have the following MWE:
>>
>> \usemodule[tikz]
>> \starttext
>> \starttikzpicture
>> \node {\color[red]{red}};
>> \node[xshift=30] {\color[red]{not red}};
>> \stoptikzpicture
>> \stoptext
>>
>> Can anybody tell me why the second node is not colored red?
>>
>> Aside: In LaTeX when using \color{red}{...} this tikzpicture renders
>> correctly. For LaTeX I use TikZ version 3.0.1a, in ConTeXt it seems to
>> be version 3.0.1.
>>
>> Any feedback is welcome.
>
> tikz has its own color mechanisms and they don't mix well with context
> color support so context probbably thinks it's still in red (so you need
> to force something non red in front)
>
> \starttikzpicture
> \node {\color[red]{red}};
> \node[xshift=30] {\zwnj\color[red]{not red}};
> \stoptikzpicture
Thank you Hans! This workaround does the job.
For those interested: The \zwnj can be prepended automatically to
every node by setting "every node/.add code=\zwnj". The updated MWE
now is:
\usemodule[tikz]
\tikzset{every node/.add code=\zwnj}
\starttext
\starttikzpicture
\node {\color[red]{red}};
\node[xshift=30] {\color[red]{not red}};
\stoptikzpicture
\stoptext
Cheers,
Christoph
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________