summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx b/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
index 50271f57b35..d5cd5b04285 100644
--- a/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
+++ b/Master/texmf-dist/source/latex/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
@@ -240,6 +240,17 @@
\c_@@_backend_main_stack_int
\int_const:cn { main@pdfcolorstack } { \c_@@_backend_main_stack_int }
}
+% \end{macrocode}
+% The backend automatically restores the stack color from the \enquote{classical}
+% approach (\texttt{pdf:bcolor}) after a scope. That will be an issue for us, so
+% we manually ensure that the one we are using is inserted.
+% \begin{macrocode}
+ \cs_gset_protected:Npn \__kernel_backend_scope_end:
+ {
+ \__kernel_backend_literal:n { x:grestore }
+ \__kernel_backend_literal:n
+ { pdfcolorstack ~ \g_@@_backend_stack_int current }
+ }
}
% \end{macrocode}
% \end{variable}