[latex3-commits] [git/LaTeX3-latex3-xcolor] testl3color: support switching of the color stack with pdfcol (dfb53cf)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Jan 16 14:00:03 CET 2023
Repository : https://github.com/latex3/xcolor
On branch : testl3color
Link : https://github.com/latex3/xcolor/commit/dfb53cf421aa7397bc2bdf403369866b68bd3a1a
>---------------------------------------------------------------
commit dfb53cf421aa7397bc2bdf403369866b68bd3a1a
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Jan 16 14:00:03 2023 +0100
support switching of the color stack with pdfcol
>---------------------------------------------------------------
dfb53cf421aa7397bc2bdf403369866b68bd3a1a
xcolor.dtx | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/xcolor.dtx b/xcolor.dtx
index 02ae333..85a12c6 100644
--- a/xcolor.dtx
+++ b/xcolor.dtx
@@ -7103,6 +7103,33 @@
%-------------------------------------------------------------------------------
% \fi
%
+% \subsection{Temporary patches to other packages}
+%
+% The following are patches needed during the transition to the l3color commands.
+% They should disappear again!
+%
+% \subsubsection{pdfcol}
+% The pdfcol package allows to switch the color stack, but it does it only
+% for the name |\@pdfcolorstack| used in the color/xcolor backend. We need to
+% switch also the l3color stack:
+% \begin{macrocode}
+%<*package>
+\ExplSyntaxOn
+\AddToHook{package/pdfcol/after}
+ {
+ \def\pdfcolSwitchStack#1{%
+ \pdfcolIfStackExists{#1}{%
+ \expandafter\let\expandafter\@pdfcolorstack
+ \csname pdfcol at Stack@#1\endcsname
+ \int_set:Nn\l__color_backend_stack_int{ \@pdfcolorstack }
+ }{%
+ \pdfcol at ErrorNoStack{#1}%
+ }%
+ }%
+}
+\ExplSyntaxOff
+%</package>
+% \end{macrocode}
% \subsection{Auxiliary definitions}
%
% \subsubsection{\Index{PostScript} prologue file \File{xcolor.pro}}
More information about the latex3-commits
mailing list.