|
From: Mojca M. <moj...@gm...> - 2011-08-30 22:53:12
|
Dear Peter and others,
by checking some old code (mostly thanks to github) I think that I
have found the solution for the problem I described last time [sorry
for top-posting]. It was actually Peter's code that probably got lost
somehow/for unknown reason.
When I tested tikz with context in February 2011 it worked fine, but I
admit that back then I was still using my own copy of tikz terminal
before it got included into CVS. It worked at that time (my own copy),
however at the moment the color handling is broken completely
(documents don't even compile).
I'm not sure if this solves all problems (or if it doesn't introduce
any new problems), but at least the basic functionality is restored if
\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}}}
gets replaced by
\tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\tikzset{color=.}}}
\tikzset{global rgb
color/.code={\pgfutil@definecolor{.}{rgb}{#1}\pgfsetcolor{.}}}
\tikzset{global color/.code={\pgfsetcolor{#1}}}
in gnuplot-lua-tikz-common.tex.
May I ask for changing this?
https://sourceforge.net/tracker/?func=detail&aid=3401068&group_id=2055&atid=102055
Thank you,
Mojca
On Fri, Aug 19, 2011 at 01:33, Mojca Miklavec wrote:
> 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
>
|