[latex3-commits] [git/LaTeX3-latex3-pdfresources] rename-coredict: save colorstack comment (7204712)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Dec 2 00:31:27 CET 2020


Repository : https://github.com/latex3/pdfresources
On branch  : rename-coredict
Link       : https://github.com/latex3/pdfresources/commit/72047128f78ae95c48a83679557da488eebcafb9

>---------------------------------------------------------------

commit 72047128f78ae95c48a83679557da488eebcafb9
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Dec 2 00:31:27 2020 +0100

    save colorstack comment


>---------------------------------------------------------------

72047128f78ae95c48a83679557da488eebcafb9
 newpackages/new-transparent.sty | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/newpackages/new-transparent.sty b/newpackages/new-transparent.sty
index 78394ca..1da0a4c 100644
--- a/newpackages/new-transparent.sty
+++ b/newpackages/new-transparent.sty
@@ -150,3 +150,53 @@ xxxx
 \ExplSyntaxOff
 
 %% colorstack abstraction
+\documentclass[12pt]{article}
+\usepackage{kantlipsum,iftex}
+
+\begin{document}
+\ifxetex
+\special{pdfcolorstackinit 1 page direct (0 g)}
+\special{pdfcolorstackinit 2 direct (0 g)}
+\special{pdfcolorstack 2 push (0 1 0 rg)}
+\special{pdfcolorstack 1 push (1 0 0 rg)}
+1: red abc
+\special{pdfcolorstack 1 push (0 0 1 rg)}
+1: blue abc
+\special{pdfcolorstack 1 pop}
+1: red again
+\special{pdfcolorstack 2 current}
+2: green
+\special{pdfcolorstack 1 current}
+1: still red
+\special{pdfcolorstack 2 current}
+2: green
+\newpage
+
+should be red
+\else
+\edef\stackA {\pdfcolorstackinit page direct {0 g}}
+\edef\stackB {\pdfcolorstackinit direct {0 g}}
+
+\pdfcolorstack\stackB push {0 1 0 rg}
+\pdfcolorstack\stackA push {1 0 0 rg}
+1: red abc
+\pdfcolorstack\stackA push {0 0 1 rg}
+1: blue abc
+\pdfcolorstack\stackA pop
+1: red again
+\pdfcolorstack\stackB current
+2: green
+\pdfcolorstack\stackA current
+1: still red
+\pdfcolorstack\stackB current
+2: green
+\newpage
+
+should be red
+
+\pdfcolorstack\stackB pop
+aa
+
+
+\fi
+\end{document}





More information about the latex3-commits mailing list.