[latex3-commits] [git/LaTeX3-latex3-xcolor] testl3color: test dvips driver (b027a05)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Aug 16 23:06:42 CEST 2022
Repository : https://github.com/latex3/xcolor
On branch : testl3color
Link : https://github.com/latex3/xcolor/commit/b027a05a6a8f629b2369f3745cec03b63c16dcb8
>---------------------------------------------------------------
commit b027a05a6a8f629b2369f3745cec03b63c16dcb8
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Aug 16 23:06:42 2022 +0200
test dvips driver
>---------------------------------------------------------------
b027a05a6a8f629b2369f3745cec03b63c16dcb8
.../l3color-setcolor-03.lvt | 34 +-
testfiles-etex/l3color-setcolor-03.tlg | 410 +++++++++++++++++++++
xcolor.dtx | 13 +-
3 files changed, 434 insertions(+), 23 deletions(-)
diff --git a/testfiles/l3color-setcolor-03.lvt b/testfiles-etex/l3color-setcolor-03.lvt
similarity index 68%
copy from testfiles/l3color-setcolor-03.lvt
copy to testfiles-etex/l3color-setcolor-03.lvt
index 326ad2b..06b677b 100644
--- a/testfiles/l3color-setcolor-03.lvt
+++ b/testfiles-etex/l3color-setcolor-03.lvt
@@ -3,14 +3,10 @@
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
-\usepackage{colorspace}
-\definespotcolor{spot}{PANTONE 3005 U}{1,0.56,0,0}
\begin{document}
\START
\showoutput
-\color{spot} spot
-
\color{red!50!RoyalBlue} mix
\color[gray] {0.5} gray 0.5
@@ -25,31 +21,32 @@
\color[cmyk] {0.5,0.4,1,0.2} cmyk
-\color[hsb] {0.5,0.4,0.2} xxx
+\color[hsb] {0.5,0.4,0.2} hsb
\color[wave] {610} wave
\color[tHsb] {233,0.4,0.2} tHsb
{
-\def\rangeHsb{300}
-\def\rangetHsb{80,45;130,70;185,130;210,175;240,240;300,300}
-\color[tHsb] {233,0.4,0.2} tHsb~with~range
-{rgb}{0.15973~0.12~0.2}
+ \def\rangeHsb{300}
+ \def\rangetHsb{80,45;130,70;185,130;210,175;240,240;300,300}
+ \color[tHsb] {233,0.4,0.2} tHsb~with~range
+
+ {rgb}{0.15973~0.12~0.2}
}
-\color[Gray] {12} xxx
+\color[Gray] {12} Gray
- {
+{
\def\rangeGray{30}
- \color[Gray] {12} xxx
- }
+ \color[Gray] {12} Gray with range
+}
-\color[RGB] {12,98,254} xxx
+\color[RGB] {12,98,254} RGB
{
\def\rangeRGB{300}
@@ -61,24 +58,23 @@
\color[Hsb] {180,0.4,0.2} Hsb
- {
+{
\def\rangeHsb{400}
\color[Hsb] {180,0.4,0.2}
Hsb-with-range
- }
+}
\color[HSB] {180,100,240} HSB
- {
+{
\def\rangeHSB{400}
\color[HSB] {180,100,240}
HSB-with-range
- }
+}
\color[HTML] {FF5733} HTML
\color[cmyk:HTML] {FF5733} Target
-\OMIT
\end{document}
diff --git a/testfiles-etex/l3color-setcolor-03.tlg b/testfiles-etex/l3color-setcolor-03.tlg
new file mode 100644
index 0000000..4d8ba5c
--- /dev/null
+++ b/testfiles-etex/l3color-setcolor-03.tlg
@@ -0,0 +1,410 @@
+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
+.\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.0}
+....\special{ps:SDict begin /color.sc {} def end}
+....\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 299.96796fil
+...\write-{}
+...\special{color push gray 0.0}
+...\special{ps:SDict begin /color.sc {} def end}
+...\special{color push rgb 0.5 0.25 0.5}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\topskip) 3.32141
+...\hbox(6.67859+0.0)x345.0, glue set 313.61105fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 x
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push gray 0.5}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.55556
+...\hbox(6.44444+1.94444)x345.0, glue set 294.97214fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 0
+....\OT1/cmr/m/n/10 .
+....\OT1/cmr/m/n/10 5
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push rgb 1.0 0.3 0.5}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+1.94444)x345.0, glue set 315.52774fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 b
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push cmyk 0.0 0.7 0.5 0.0}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+1.94444)x345.0, glue set 273.52768fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 b
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 s
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 m
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\OT1/cmr/m/n/10 k
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\special{color pop}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push cmyk 0.5 0.4 1.0 0.2}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+1.94444)x345.0, glue set 306.94438fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 m
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\OT1/cmr/m/n/10 k
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.5 0.4 0.2}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+0.0)x345.0, glue set 314.94441fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 b
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.09012 1 1}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 7.69446
+...\hbox(4.30554+0.0)x345.0, glue set 308.88887fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 w
+....\kern-0.27779
+....\OT1/cmr/m/n/10 a
+....\kern-0.27779
+....\OT1/cmr/m/n/10 v
+....\kern-0.27779
+....\OT1/cmr/m/n/10 e
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.62779 0.4 0.2}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+0.0)x345.0, glue set 309.11107fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 b
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.74944 0.4 0.2}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+1.94444)x345.0, glue set 259.0832fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 b
+....\penalty 10000
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 w
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\penalty 10000
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 e
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+1.94444)x345.0, glue set 245.52756fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 b
+....\OT1/cmr/m/n/10 0
+....\OT1/cmr/m/n/10 .
+....\OT1/cmr/m/n/10 1
+....\OT1/cmr/m/n/10 5
+....\OT1/cmr/m/n/10 9
+....\OT1/cmr/m/n/10 7
+....\OT1/cmr/m/n/10 3
+....\penalty 10000
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 0
+....\OT1/cmr/m/n/10 .
+....\OT1/cmr/m/n/10 1
+....\OT1/cmr/m/n/10 2
+....\penalty 10000
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 0
+....\OT1/cmr/m/n/10 .
+....\OT1/cmr/m/n/10 2
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color pop}
+...\special{color push gray 0.8}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.22224
+...\hbox(6.83331+1.94444)x345.0, glue set 308.23607fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 G
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push gray 0.8}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+1.94444)x345.0, glue set 254.87488fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 G
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 w
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\special{color pop}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push rgb 0.04706 0.38431 0.99608}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.22224
+...\hbox(6.83331+0.0)x345.0, glue set 307.98608fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 R
+....\kern-0.27779
+....\OT1/cmr/m/n/10 G
+....\OT1/cmr/m/n/10 B
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push rgb 0.04706 0.38431 0.99608}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+0.0)x345.0, glue set 305.77774fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 b
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\special{color pop}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push cmyk 0.5 0.5 1.0 0.0}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 7.69446
+...\hbox(4.30554+1.94444)x345.0, glue set 312.22218fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 m
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.5 0.4 0.2}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+0.0)x345.0, glue set 312.99997fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 b
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.45 0.4 0.2}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+1.94444)x345.0, glue set 259.63878fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 b
+....\OT1/cmr/m/n/10 -
+....\discretionary
+....\OT1/cmr/m/n/10 w
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 -
+....\discretionary
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\special{color pop}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.75 0.41667 1}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.22224
+...\hbox(6.83331+0.0)x345.0, glue set 309.86105fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 B
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push hsb 0.45 0.25 0.6}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+1.94444)x345.0, glue set 256.49986fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 B
+....\OT1/cmr/m/n/10 -
+....\discretionary
+....\OT1/cmr/m/n/10 w
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 -
+....\discretionary
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\special{color pop}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push rgb 1 0.34118 0.2}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.22224
+...\hbox(6.83331+0.0)x345.0, glue set 299.86105fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 H
+....\OT1/cmr/m/n/10 T
+....\OT1/cmr/m/n/10 M
+....\OT1/cmr/m/n/10 L
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\special{color push cmyk 0.0 0.65881 0.8 0.0}
+...\special{ps:SDict begin /color.sc {} def end}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.16669
+...\hbox(6.83331+1.94444)x345.0, glue set 301.36107fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 T
+....\kern-0.83334
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 t
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -1.94444
+...\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
+...\special{color push gray 0.0}
+...\special{ps:SDict begin /color.sc {} def end}
+...\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
+...\special{color pop}
+.\kern 0.0
+(l3color-setcolor-03.aux)
diff --git a/xcolor.dtx b/xcolor.dtx
index b48c18c..dbf4693 100644
--- a/xcolor.dtx
+++ b/xcolor.dtx
@@ -5398,17 +5398,22 @@
\str_case:nnF {#4}
{
{&spot}{ \XC at ori@set at color }
- {tHsb}{ \XC at ori@set at color }
+ { tHsb}{ \XC at ori@set at color }
{ cmy }{ \color_select:nn{cmyk}{#5,0} }
}
{
\str_if_eq:VnTF\c_sys_backend_str { dvips }
{
- \str_case:nnF {#2}
+ \bool_lazy_any:nTF
{
- {ps} { \XC at ori@set at color }
- {named} { \XC at ori@set at color }
+ {\str_if_eq_p:nn{#4}{hsb}}
+ {\str_if_eq_p:nn{#4}{Hsb}}
+ {\str_if_eq_p:nn{#4}{HSB}}
+ {\str_if_eq_p:nn{#4}{wave}}
+ {\str_if_eq_p:nn{#2}{names}}
+ {\str_if_eq_p:nn{#2}{ps}}
}
+ { \XC at ori@set at color }
{ \color_select:nn{#4}{#5}}
}
{ \color_select:nn{#4}{#5} }
More information about the latex3-commits
mailing list.