latex3 / pdfresources

LaTeX PDF resource management
LaTeX Project Public License v1.3c
22 stars 8 forks source link

colorspace patches break functionality #78

Closed mbertucci47 closed 1 month ago

mbertucci47 commented 1 month ago

I think the patches in colorspace-patches-tmp-ltx.sty break much of the functionality of colorspace. Here's an example.

\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
%    testphase={phase-III,title,math,table,firstaid}
  }
\documentclass{article}
\usepackage{colorspace}
\usepackage{kantlipsum}

\definespotcolor{foo}{BarTone 555 GN}{.8,.2,.5,.3}
\definespotcolor{registration}{All}{1,1,1,1}
\definecolorspace{fooshaded}{mixed}{foo,black}
\definecolor{darkfoo}{fooshaded}{.6,.3}

\begin{document}

text

\textcolor{red}{text}

\textcolor{foo}{text}

\textcolor{foo!50}{text}

\textcolor{registration}{text}

{\color[fooshaded]{.6,.3} text}

\textcolor{darkfoo}{text}

{\color{darkfoo}\kant[1-6]}

\newpage

{\color{foo}\kant[1-6]}
\end{document}

Without \DocumentMetadata{}, everything is as expected. With it, several of the colors are either wrong or don't appear at all. Also, odd things happen over pagebreaks. With {\color{darkfoo}\kant[1-6]} all the text appears but the color is wrong on the first page. With {\color{foo}\kant[1-6]} only the text on the second page appears.

u-fischer commented 1 month ago

Oh well, nice finding ;-). The patches are okay, but it would be better to apply them at the begin of the document and not only on the last page ;-(. Btw: if tikz or pgf are loaded it works as then the resources are added to all pages.

I will transfer the issue to the pdfresources.

u-fischer commented 1 month ago

fix one the way to ctan (version 0.96l)