|
From: Mojca M. <moj...@gm...> - 2011-08-18 23:33:10
|
Dear Peter,
there seems to be a problem with colours in ConTeXt with TikZ terminal
in gnuplot. I'm not sure since when the problem exists (when I was
last testing it worked fine, but that was probably several months
ago).
Please keep in mind that \color is an existing command in ConTeXt that
uses a different syntax than LaTeX, so your code using \color is not
really portable.
% wrapper for color settings
\def\gpcolor#1{\tikzset{global #1}}
\tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\color{.}}}
\tikzset{global rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\color{.}}}
\tikzset{global color/.code={\color{#1}}}
Here is a minimal context document to reproduce the problem (you may
try to use TeX Live 2011 to compile it; TikZ has been patched, so it
works with ConTeXt again):
\usemodule[gnuplot-lua-tikz]
\starttext
\starttikzpicture[gnuplot]
\gpcolor{color=gp lt color border}
\gpsetlinetype{gp lt border}
\draw[gp path] (1.410,7.185)--(1.410,0.730)--(12.048,0.730)--(12.048,7.185)--cycle;
\stoptikzpicture
\stoptext
Here is the error:
! Use of \color doesn't match its definition.
\pgfkeys@code #1\pgfeov ->\color {
#1}
\pgfkeysifdefined ...ifcsname pgfk@#1\endcsname #2
\else #3\fi
\pgfkeys@unpack ...pgfeov \else \pgfkeys@case@one
\fi \fi
\pgfkeys@normal ...\pgfkeysnovalue =\pgfkeys@stop
\pgfkeys@parse
\pgfkeys@@qset ...aultpath {#2/}\pgfkeys@parse #3,
\pgfkeys@mainstop \def \pg...
l.5 \gpcolor{color=gp lt color border}
?
You either need to write a different code for ConTeXt or use some
other strategy to apply colours.
Thank you very much,
Mojca
|