With 2009.07.20 09:35 MKIV & latest TikZ I get (among many other errors that follow) ! Undefined control sequence. \pgfutil@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. Mojca
On Mon, 20 Jul 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@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.
A minimal (or even not so minimal) example will surely help. If it is something on the ConTeXt side, we can add it to the mkii compatibility module, m-mkii.mkiv. Also, which version of tikz are you using? Aditya
Aditya Mahajan wrote:
On Mon, 20 Jul 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@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.
A minimal (or even not so minimal) example will surely help. If it is something on the ConTeXt side, we can add it to the mkii compatibility module, m-mkii.mkiv.
probably only a few lines patch in some of the tikz context files is needed indeed having a sample + the latest version helps (the problem is that i normally keep all tex stuff in my main texlive tree, and only updates that once per year as it is some reference) Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Mon, Jul 20, 2009 at 17:49, Hans Hagen wrote:
Aditya Mahajan wrote:
On Mon, 20 Jul 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@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.
A minimal (or even not so minimal) example will surely help. If it is something on the ConTeXt side, we can add it to the mkii compatibility module, m-mkii.mkiv.
probably only a few lines patch in some of the tikz context files is needed
indeed having a sample + the latest version helps (the problem is that i normally keep all tex stuff in my main texlive tree, and only updates that once per year as it is some reference)
Not sure if minimal example is needed: I suspect that almost anything breaks ... \usemodule[tikz] \starttext \starttikzpicture \fill[gray] (1,1) rectangle +(1,1); \stoptikzpicture \stoptext TikZ gets updated on regular basis from CVS. I cannot say which version exactly I'm using (how do I check that easily?), but ChangeLog mentions "2009-07-08" as the latest entry. I suspect that recent changes in MKIV broke functionality, not recent changes in TikZ itself. To Hans (and Till Tantau as well): you can get the latest version with --extras=t-tikz in ConTeXt minimals (that's what I am using). I just wanted to check if sectioning has been fixed, but I didn't manage to compile the document at all (later on there were some other problems). Starting with ! Math error: parameter \Umathquad\displaystyle is not set. and going to infinity ... :) If that means that I need a more recent version of LuaTeX then I'm not going to try it out now. Mojca
Pgfplots also seem to be broken (loading the module is enough to trigger the error), but that's also broken in MKII. That needs to be fixed by the author and I think that the problem is unrelated. Mojca
Mojca Miklavec wrote:
With 2009.07.20 09:35 MKIV & latest TikZ I get (among many other errors that follow)
! Undefined control sequence. \pgfutil@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 ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Mon, 20 Jul 2009, Hans Hagen wrote:
Mojca Miklavec wrote:
With 2009.07.20 09:35 MKIV & latest TikZ I get (among many other errors that follow)
! Undefined control sequence. \pgfutil@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.
I am using the latest context minimals with latest tikz. Test file: \logginall \usemodule[tikz] \starttext \input knuth \stoptext The log file says \pgfutil@addpdfresource@colorspaces #1->\appendtoPDFdocumentcolorspaces {#1} #1<- /pgfprgb [/Pattern /DeviceRGB] {undefined} So, \appendtoPDFdocumentcolorspaces is undefined. Now, \append...colorspaces is defined in back-pdf.tex which AFAIU that file is not loaded. It is redefined in spec-fdf.mkii, so mkii uses that defininition. In mkiv, back-pdf.mkiv defines \pdfbackendsetcolorspace. So, which command should tikz use so that it works with both mkii and mkiv. Or should it do a \beginLUATEX redefinition of some macros for mkiv? The relavant tikz file is tex/generic/pgf/pgfutil-context.def so the changes there will not affect latex. Aditya
Aditya Mahajan wrote:
On Mon, 20 Jul 2009, Hans Hagen wrote:
Mojca Miklavec wrote:
With 2009.07.20 09:35 MKIV & latest TikZ I get (among many other errors that follow)
! Undefined control sequence. \pgfutil@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.
I am using the latest context minimals with latest tikz.
Test file:
\logginall \usemodule[tikz] \starttext \input knuth \stoptext
The log file says
\pgfutil@addpdfresource@colorspaces #1->\appendtoPDFdocumentcolorspaces {#1} #1<- /pgfprgb [/Pattern /DeviceRGB] {undefined}
hm, my logfile says nothing
So, \appendtoPDFdocumentcolorspaces is undefined.
Now, \append...colorspaces is defined in back-pdf.tex which AFAIU that file is not loaded. It is redefined in spec-fdf.mkii, so mkii uses that defininition. In mkiv, back-pdf.mkiv defines \pdfbackendsetcolorspace.
So, which command should tikz use so that it works with both mkii and mkiv. Or should it do a \beginLUATEX redefinition of some macros for mkiv? The relavant tikz file is tex/generic/pgf/pgfutil-context.def so the changes there will not affect latex.
something \ifnum\texengine=\luatexengine \pdfbackendsetcolorspace{pgfprgb}{[/Pattern /DeviceRGB]}% \else \appendtoPDFdocumentcolorspaces{/pgfprgb [/Pattern /DeviceRGB]}% \fi but i didn't test 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 -----------------------------------------------------------------
Hans Hagen wrote:
Aditya Mahajan wrote:
On Mon, 20 Jul 2009, Hans Hagen wrote:
Mojca Miklavec wrote:
With 2009.07.20 09:35 MKIV & latest TikZ I get (among many other errors that follow)
! Undefined control sequence. \pgfutil@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.
I am using the latest context minimals with latest tikz.
Test file:
\logginall \usemodule[tikz] \starttext \input knuth \stoptext
The log file says
\pgfutil@addpdfresource@colorspaces #1->\appendtoPDFdocumentcolorspaces {#1} #1<- /pgfprgb [/Pattern /DeviceRGB] {undefined}
hm, my logfile says nothing
So, \appendtoPDFdocumentcolorspaces is undefined.
Now, \append...colorspaces is defined in back-pdf.tex which AFAIU that file is not loaded. It is redefined in spec-fdf.mkii, so mkii uses that defininition. In mkiv, back-pdf.mkiv defines \pdfbackendsetcolorspace.
So, which command should tikz use so that it works with both mkii and mkiv. Or should it do a \beginLUATEX redefinition of some macros for mkiv? The relavant tikz file is tex/generic/pgf/pgfutil-context.def so the changes there will not affect latex.
something
\ifnum\texengine=\luatexengine \pdfbackendsetcolorspace{pgfprgb}{[/Pattern /DeviceRGB]}% \else \appendtoPDFdocumentcolorspaces{/pgfprgb [/Pattern /DeviceRGB]}% \fi
but i didn't test it
i tried to locate the relevant code but as not all context specific code sits in the context subdir i give up (Till probably can fix it way faster) The following code at least gets the resource pointers in the file (works with beta on the website) but the objects that are refered to are not saved in the file \def\dopgf@sys@pdf@addtopageresources@extgs /#1 #2\relax{\pdfbackendsetextgstate{#1}{#2}} \def\dopgf@sys@pdf@addtopageresources@patterns/#1 #2\relax{\pdfbackendsetpattern {#1}{#2}} \def\pgf@sys@pdf@addtopageresources@extgs #1{\normalexpanded{\noexpand\dopgf@sys@pdf@addtopageresources@extgs #1\relax}} \def\pgf@sys@pdf@addtopageresources@patterns#1{\normalexpanded{\noexpand\dopgf@sys@pdf@addtopageresources@patterns#1\relax}} the two step is needed because \pdfbackendsetextgstate expects two arguments (in principle shades can also be dealt with but tikz keeps them local to the xform so there is no problem there) i tested with: \starttext \usetikzlibrary{patterns} \starttikzpicture \draw[pattern color=red,pattern=bricks] (0,0) circle (1cm); \stoptikzpicture \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec