[NTG-context] noheaderandfooterlines messes with colors

Aditya Mahajan adityam at umich.edu
Mon Aug 3 16:36:33 CEST 2015


On Mon, 3 Aug 2015, Hans Hagen wrote:

> \hbox\bgroup\forcecolorhack\starttikzpicture
>   \draw(0,2) node[color=red]{This should be red};
>   \draw(0,0) node[color=red]{This is red};
> \stoptikzpicture\egroup

Tikz colors are broken when using anything other than red, blue, or green. 
I know that colors defined in ConTeXt used to work in Tikz, so perhaps 
something has changed recently at the TikZ end.

@Mojca: The following definitions can go in t-tikz.tex

\usemodule[tikz]

\define\starttikzpicture
     {\hbox\bgroup\forcecolorhack\tikzpicture}

\define\stoptikzpicture
     {\endtikzpicture\egroup}

\starttext
\red{This is red} \qquad \darkred{This is dark red}

\starttikzpicture
   \draw (0,2) node[color=red] {This is red};
   \draw (4,2) node[color=darkred] {This is dark red};
\stoptikzpicture
\stoptext

Aditya



More information about the ntg-context mailing list