[dev-context] problem with TikZ & ConTeXt MKIV

Hans Hagen pragma at wxs.nl
Mon Jul 20 17:46:35 CEST 2009

Mojca Miklavec wrote:
> With 2009.07.20 09:35 MKIV & latest TikZ I get (among many other
> errors that follow)
> ! Undefined control sequence.
> \pgfutil at addpdfresource@colorspaces ...olorspaces
>                                                   {#1}
> l.396 ...rspaces{ /pgfprgb [/Pattern /DeviceRGB] }
> ?
> I don't know if that's a problem with TikZ or ConTeXt (no time to
> debug now, but maybe I can try to prepare some minimal example that
> fails; later). ConTeXt MKII works fine on the same document.

this has to do with the fact that tikz manipulates documents resources

it probably went unnnoticed in previous mkiv and mkii, but that way tikz 
was obscuring regular context resource handling (i.e. when you use mp an 
tikz mixed one of them wins with respect to resources so the other 
kind's graphics fail to view i.e. shades, transparencies, etc)

therefore in mkiv all access is shielded and goes via special macros:

\pdfbackendsetextgstate {name}{legal pdf}
\pdfbackendsetcolorspace{name}{legal pdf}
\pdfbackendsetpattern   {name}{legal pdf}
\pdfbackendsetshade     {name}{legal pdf}

normal "legal pdf" is a reference like 123 0 R

If more access is needed, i can add it but it will always go via an 
interface as in mkiv most \pdfcommands are going away.

So, tikz needs to be adapted to this. A few weeks ago I looked at it but 
found out that i had an old version so delayed it.


                                           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

More information about the dev-context mailing list