ho-tex / transparent

transparent package for LaTeX
LaTeX Project Public License v1.3c
2 stars 0 forks source link

transparent package incompatible to pgfutil-common #3

Open dbitouze opened 5 years ago

dbitouze commented 5 years ago

Despite the fix https://github.com/ho-tex/oberdiek/commit/43ec5ef6ab0f92d2c668695030aea5298609fd54 for ho-tex/transparent#1, there is still an incompatibility between transparent and pgf (more precisely pgfutil-common), as shown by the following MCE:

\documentclass{article}
\usepackage{transparent}
\input{pgfutil-common}
\begin{document}
\end{document}

the compilation of which giving the error:

! Undefined control sequence.
\pgfutil@addpdfresource@extgs ...urce@extgs@plain 
                                                  {#1}
u-fischer commented 5 years ago

Well yes, you are loading only a small utility from pgf and it doesn't contain everything. Does some real use case exist, where this leads to a problem?

dbitouze commented 5 years ago

Does some real use case exist, where this leads to a problem?

Yes:

\documentclass{article}
\usepackage{ctable}
\usepackage[showdow]{datetime2}
\begin{document}
\end{document}
josephwright commented 5 years ago

Probably this needs the 'kernel PDF feature' support we are currently working on.

dbitouze commented 5 years ago

the 'kernel PDF feature' support we are currently working on.

Yum! :)

josephwright commented 5 years ago

Yeah ... I have a plan ... of sorts

dbitouze commented 5 years ago

Meanwhile, any workaround?

u-fischer commented 5 years ago

\usepackage{pgfsys} or any superset of it (pgfcore, pgf, tikz).

mrpiggi commented 5 years ago

Does some real use case exist, where this leads to a problem?

Same with package pstricks which uses \input pgfutil-common.tex internally

\documentclass{article}
\usepackage{pstricks}
%\usepackage{pgfsys}
\usepackage{transparent}
\begin{document}
test
\end{document}
u-fischer commented 5 years ago

@mrpiggi transparent doesn't work in dvi mode anyway:

Package transparent Warning: Loading aborted, because pdfTeX is not running in 
PDF mode.
mrpiggi commented 5 years ago

Well, I could do something like

\documentclass{article}
\ifnum\pdfshellescape=1\relax\else
\PassOptionsToPackage{off}{auto-pst-pdf}
\fi
\usepackage{auto-pst-pdf}
%\usepackage{pgfsys}
\usepackage{transparent}
\begin{document}
test

\pscircle[fillstyle=solid,fillcolor=yellow]{1.5}
\end{document}
mrpiggi commented 4 years ago

The issue is still pending with any of these packages in the example

\documentclass{article}
\usepackage{transparent}
\usepackage{pgffor}
%\usepackage{pgfcalendar}
%\usepackage{pgfmath}
%\usepackage{datatool-pgfmath}
%\usepackage{csvsimple}
%\usepackage{pgfrcs}
\begin{document}
\makeatletter

\meaning\pgfutil@addpdfresource@extgs

\meaning\pgf@sys@addpdfresource@extgs@plain

\end{document}

Isn't it possible to simply change

\AtBeginDocument
 {%
   \ifcsname pgfutil@addpdfresource@extgs\endcsname
    \let\TRP@addresource\relax
    \pgfutil@addpdfresource@extgs{\TRP@list}%
   \fi
 }

to

\AtBeginDocument
 {%
   \ifcsname pgf@sys@addpdfresource@extgs@plain\endcsname
    \let\TRP@addresource\relax
    \pgfutil@addpdfresource@extgs{\TRP@list}%
   \fi
 }

?