[latex3-commits] [git/LaTeX3-latex3-xcolor] changekeyhandler: allow normalcolor to change also the dot color, issue #19 (62b68ff)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Jul 31 15:37:55 CEST 2022


Repository : https://github.com/latex3/xcolor
On branch  : changekeyhandler
Link       : https://github.com/latex3/xcolor/commit/62b68ffa5a72c309dbeb8a981e90d1c2d9042c9d

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

commit 62b68ffa5a72c309dbeb8a981e90d1c2d9042c9d
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Jul 31 15:37:55 2022 +0200

    allow normalcolor to change also the dot color, issue #19


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

62b68ffa5a72c309dbeb8a981e90d1c2d9042c9d
 testfiles/github-019.luatex.tlg  | 72 ++++++++++++++++++++++++++++++++++++
 testfiles/github-019.lvt         | 12 ++++++
 testfiles/github-019.tlg         | 62 +++++++++++++++++++++++++++++++
 testfiles/github-019.xetex.tlg   | 43 ++++++++++++++++++++++
 testfiles/github-019b.luatex.tlg | 79 ++++++++++++++++++++++++++++++++++++++++
 testfiles/github-019b.lvt        | 13 +++++++
 testfiles/github-019b.tlg        | 66 +++++++++++++++++++++++++++++++++
 testfiles/github-019b.xetex.tlg  | 73 +++++++++++++++++++++++++++++++++++++
 xcolor.dtx                       |  4 +-
 9 files changed, 423 insertions(+), 1 deletion(-)

diff --git a/testfiles/github-019.luatex.tlg b/testfiles/github-019.luatex.tlg
new file mode 100644
index 0000000..6b8581a
--- /dev/null
+++ b/testfiles/github-019.luatex.tlg
@@ -0,0 +1,72 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0, direction TLT
+.\hbox(0.0+0.0)x0.0, direction TLT
+..\kern-72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil, direction TLT
+...\kern-72.26999
+...\hbox(0.0+0.0)x0.0, direction TLT
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil, direction TLT
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0, direction TLT
+....\pdfcolorstack 0 push {0 g 0 G}
+....\hbox(0.0+0.0)x345.0, direction TLT
+....\pdfcolorstack 0 pop
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 539.94232fil, direction TLT
+...\write-{}
+...\pdfcolorstack 0 push {0 g 0 G}
+...\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG}
+...\glue(\topskip) 3.06
+...\hbox(6.94+0.11)x345.0, glue set 248.24fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 r
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 d
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\pdfcolorstack 0 push {0 g 0 G}
+....\TU/lmr/m/n/10 n
+....\TU/lmr/m/n/10 o
+....\TU/lmr/m/n/10 r
+....\discretionary (penalty 50)
+.....< \TU/lmr/m/n/10 -
+....\TU/lmr/m/n/10 m
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 l
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\pdfcolorstack 0 push {0 g 0 G}
+....\TU/lmr/m/n/10 n
+....\TU/lmr/m/n/10 o
+....\TU/lmr/m/n/10 r
+....\discretionary (penalty 50)
+.....< \TU/lmr/m/n/10 -
+....\TU/lmr/m/n/10 m
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 l
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -0.11
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.34
+..\hbox(6.66+0.0)x345.0, direction TLT
+...\pdfcolorstack 0 push {0 g 0 G}
+...\hbox(6.66+0.0)x345.0, glue set 170.0fil, direction TLT
+....\glue 0.0 plus 1.0fil
+....\TU/lmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+...\pdfcolorstack 0 pop
+.\kern0.0
diff --git a/testfiles/github-019.lvt b/testfiles/github-019.lvt
new file mode 100644
index 0000000..91a72f7
--- /dev/null
+++ b/testfiles/github-019.lvt
@@ -0,0 +1,12 @@
+\input{regression-test}
+\documentclass{article}
+\usepackage{xcolor}
+\begin{document}
+\showoutput
+\START
+\color{red} red
+\normalcolor normal
+\color{.}   normal
+\newpage
+\OMIT
+\end{document}
\ No newline at end of file
diff --git a/testfiles/github-019.tlg b/testfiles/github-019.tlg
new file mode 100644
index 0000000..bb402c0
--- /dev/null
+++ b/testfiles/github-019.tlg
@@ -0,0 +1,62 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+..\kern -72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil
+...\kern -72.26999
+...\hbox(0.0+0.0)x0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+....\pdfcolorstack 0 push {0 g 0 G}
+....\hbox(0.0+0.0)x345.0
+....\pdfcolorstack 0 pop
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+...\write-{}
+...\pdfcolorstack 0 push {0 g 0 G}
+...\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.0)x345.0, glue set 248.24982fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 d
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\pdfcolorstack 0 push {0 g 0 G}
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 l
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\pdfcolorstack 0 push {0 g 0 G}
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 l
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0
+...\pdfcolorstack 0 push {0 g 0 G}
+...\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\OT1/cmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+...\pdfcolorstack 0 pop
+.\kern 0.0
diff --git a/testfiles/github-019.xetex.tlg b/testfiles/github-019.xetex.tlg
new file mode 100644
index 0000000..b5155ea
--- /dev/null
+++ b/testfiles/github-019.xetex.tlg
@@ -0,0 +1,43 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+....\special{color push gray 0}
+....\hbox(0.0+0.0)x345.0
+....\special{color pop}
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+...\write-{}
+...\special{color push gray 0}
+...\special{color push rgb 1 0 0}
+...\glue(\topskip) 3.06
+...\hbox(6.94+0.10999)x345.0, glue set 248.24fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 red
+....\glue 3.33 plus 1.665 minus 1.11
+....\special{color push gray 0}
+....\TU/lmr/m/n/10 normal
+....\glue 3.33 plus 1.665 minus 1.11
+....\special{color push gray 0}
+....\TU/lmr/m/n/10 normal
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -0.10999
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.34
+..\hbox(6.66+0.0)x345.0
+...\special{color push gray 0}
+...\hbox(6.66+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\TU/lmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+...\special{color pop}
diff --git a/testfiles/github-019b.luatex.tlg b/testfiles/github-019b.luatex.tlg
new file mode 100644
index 0000000..ac9b68d
--- /dev/null
+++ b/testfiles/github-019b.luatex.tlg
@@ -0,0 +1,79 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0, direction TLT
+.\hbox(0.0+0.0)x0.0, direction TLT
+..\kern-72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil, direction TLT
+...\kern-72.26999
+...\hbox(0.0+0.0)x0.0, direction TLT
+....\latelua0{ltx.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readonly_int"])}
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil, direction TLT
+...\glue 0.0 plus 1.0fil
+...\pdflinkstate 1
+...\hbox(0.0+0.0)x345.0, direction TLT
+....\pdfcolorstack 0 push {0 g 0 G}
+....\hbox(0.0+0.0)x345.0, direction TLT
+....\pdfcolorstack 0 pop
+...\pdflinkstate 0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 539.94232fil, direction TLT
+...\latelua0{ltx.__pdf.Page.Resources.ExtGState=true}
+...\latelua0{ltx.pdf.Page_Resources_gpush(tex.count["g_shipout_readonly_int"])}
+...\write-{}
+...\pdfcolorstack 0 push {0 g 0 G}
+...\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG}
+...\glue(\topskip) 3.06
+...\hbox(6.94+0.11)x345.0, glue set 248.24fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\TU/lmr/m/n/10 r
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 d
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\pdfcolorstack 0 push {0 g 0 G}
+....\TU/lmr/m/n/10 n
+....\TU/lmr/m/n/10 o
+....\TU/lmr/m/n/10 r
+....\discretionary (penalty 50)
+.....< \TU/lmr/m/n/10 -
+....\TU/lmr/m/n/10 m
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 l
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\pdfcolorstack 0 push {0 g 0 G}
+....\TU/lmr/m/n/10 n
+....\TU/lmr/m/n/10 o
+....\TU/lmr/m/n/10 r
+....\discretionary (penalty 50)
+.....< \TU/lmr/m/n/10 -
+....\TU/lmr/m/n/10 m
+....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 l
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -0.11
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\pdflinkstate 1
+..\glue(\baselineskip) 23.34
+..\hbox(6.66+0.0)x345.0, direction TLT
+...\pdfcolorstack 0 push {0 g 0 G}
+...\hbox(6.66+0.0)x345.0, glue set 170.0fil, direction TLT
+....\glue 0.0 plus 1.0fil
+....\TU/lmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+...\pdfcolorstack 0 pop
+..\pdflinkstate 0
+.\kern0.0
diff --git a/testfiles/github-019b.lvt b/testfiles/github-019b.lvt
new file mode 100644
index 0000000..d220af2
--- /dev/null
+++ b/testfiles/github-019b.lvt
@@ -0,0 +1,13 @@
+\DocumentMetadata{}
+\input{regression-test}
+\documentclass{article}
+\usepackage{xcolor}
+\begin{document}
+\showoutput
+\START
+\color{red} red
+\normalcolor normal
+\color{.}   normal
+\newpage
+\OMIT
+\end{document}
diff --git a/testfiles/github-019b.tlg b/testfiles/github-019b.tlg
new file mode 100644
index 0000000..3e8501e
--- /dev/null
+++ b/testfiles/github-019b.tlg
@@ -0,0 +1,66 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+..\kern -72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil
+...\kern -72.26999
+...\hbox(0.0+0.0)x0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\pdfrunninglinkoff
+...\hbox(0.0+0.0)x345.0
+....\pdfcolorstack 0 push {0 g 0 G}
+....\hbox(0.0+0.0)x345.0
+....\pdfcolorstack 0 pop
+...\pdfrunninglinkon
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+...\write-{}
+...\pdfcolorstack 0 push {0 g 0 G}
+...\pdfcolorstack 0 push {1 0 0 rg 1 0 0 RG}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.0)x345.0, glue set 248.24982fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 d
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\pdfcolorstack 0 push {0 g 0 G}
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 l
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\pdfcolorstack 0 push {0 g 0 G}
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 l
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\pdfrunninglinkoff
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0
+...\pdfcolorstack 0 push {0 g 0 G}
+...\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\OT1/cmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+...\pdfcolorstack 0 pop
+..\pdfrunninglinkon
+.\kern 0.0
diff --git a/testfiles/github-019b.xetex.tlg b/testfiles/github-019b.xetex.tlg
new file mode 100644
index 0000000..6b0a52c
--- /dev/null
+++ b/testfiles/github-019b.xetex.tlg
@@ -0,0 +1,73 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+..\special{pdf:obj @pdf.obj1 <<  >>}
+..\special{pdf:obj @pdf.obj2 <<  >>}
+..\special{pdf:obj @pdf.obj3 <<  >>}
+..\special{pdf:obj @pdf.obj4 <<  >>}
+.\hbox(0.0+0.0)x0.0
+..\kern -72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil
+...\kern -72.26999
+...\hbox(0.0+0.0)x0.0
+....\special{pdf: put @thispage <<>>}
+....\special{pdf:put @resources <</ExtGState @pdf.obj1>>}
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\special{pdf:nolink}
+...\hbox(0.0+0.0)x345.0
+....\special{color push gray 0}
+....\hbox(0.0+0.0)x345.0
+....\special{color pop}
+...\special{pdf:link}
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+...\special{pdf:put @pdf.obj1<</opacity1 <</ca 1/CA 1>>>>}
+...\special{pdf:trailerid[ <00112233445566778899aabbccddeeff> <001122334455667788\ETC.}
+...\write-{}
+...\special{color push gray 0}
+...\special{color push rgb 1 0 0}
+...\glue(\topskip) 3.06
+...\hbox(6.94+0.10999)x345.0, glue set 248.24fil
+....\hbox(0.0+0.0)x15.0
+....\TU/lmr/m/n/10 red
+....\glue 3.33 plus 1.665 minus 1.11
+....\special{color push gray 0}
+....\TU/lmr/m/n/10 normal
+....\glue 3.33 plus 1.665 minus 1.11
+....\special{color push gray 0}
+....\TU/lmr/m/n/10 normal
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -0.10999
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\special{pdf:nolink}
+..\glue(\baselineskip) 23.34
+..\hbox(6.66+0.0)x345.0
+...\special{color push gray 0}
+...\hbox(6.66+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\TU/lmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+...\special{color pop}
+..\special{pdf:link}
+.\kern 0.0
+.\kern 0.0
+.\kern -633.0
+.\hbox(0.0+0.0)x0.0
+..\special{pdf:docinfo<</Creator (TeX)>>}
+..\special{pdf:docinfo<</Producer (xetex)>>}
+..\special{pdf:docinfo<</CreationDate (D:20010101205959-00'00')>>}
+..\special{pdf:docinfo<</ModDate (D:20010101205959-00'00')>>}
+..\special{pdf:put @catalog<</Lang (en-US)>>}
+.\kern 633.0
diff --git a/xcolor.dtx b/xcolor.dtx
index ca3964e..5e76758 100644
--- a/xcolor.dtx
+++ b/xcolor.dtx
@@ -6862,7 +6862,9 @@
 % |\normalcolor| is defined (to |\relax|) in the \LaTeX\ kernel, so it is safe to use this in macros that may possibly be used in conjunction with color.
 % It will have no effect until the \XCP{} is also loaded.
 %    \begin{macrocode}
-\protected\def\normalcolor{\let\current at color\default at color\set at color}
+\protected\def\normalcolor{\let\current at color\default at color
+\let\XC at current@color\XC at default@color\XC at display}
+\AtBeginDocument{\let\XC at default@color\XC at current@color}
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list.