[latex3-commits] [git/LaTeX3-latex3-xcolor] changekeyhandler: move hycolor patch to fix Gray color model, issue #23 (02bfc2d)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Aug 10 09:41:06 CEST 2022


Repository : https://github.com/latex3/xcolor
On branch  : changekeyhandler
Link       : https://github.com/latex3/xcolor/commit/02bfc2d1189b1fb1677a89ccdebaef34bddc4e9a

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

commit 02bfc2d1189b1fb1677a89ccdebaef34bddc4e9a
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Aug 10 09:41:06 2022 +0200

    move hycolor patch to fix Gray color model, issue #23


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

02bfc2d1189b1fb1677a89ccdebaef34bddc4e9a
 testfiles/{github-004.lvt => github-023.lvt} | 15 ++++-----------
 testfiles/{github-004.tlg => github-023.tlg} |  0
 xcolor.dtx                                   |  3 +++
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/testfiles/github-004.lvt b/testfiles/github-023.lvt
similarity index 52%
copy from testfiles/github-004.lvt
copy to testfiles/github-023.lvt
index f5c9923..7aaec78 100644
--- a/testfiles/github-004.lvt
+++ b/testfiles/github-023.lvt
@@ -1,16 +1,9 @@
 \documentclass{article}
-
-\usepackage{xcolor}
 \input{regression-test}
-
+\usepackage{xcolor}
 \begin{document}
-
-\color{blue} blue
-
-\escapechar=-1
-
 \START
-% should not generate an error
-\color{blue} blue
-
+    \selectcolormodel{Gray}
+    \definecolor{SomeColor}{Gray}{12}
 \END
+\end{document}
\ No newline at end of file
diff --git a/testfiles/github-004.tlg b/testfiles/github-023.tlg
similarity index 100%
copy from testfiles/github-004.tlg
copy to testfiles/github-023.tlg
diff --git a/xcolor.dtx b/xcolor.dtx
index f490399..ed72f48 100644
--- a/xcolor.dtx
+++ b/xcolor.dtx
@@ -3840,6 +3840,7 @@
 % Performs the test |\if|\Meta{str}\Meta[kl]{str} for $k=1,\dots,n$ and $l=1,\ldots,m_n$.
 % If for some $k,l$ the test is `true', then the attached code \Meta[k]{code} is executed.
 % If all tests are `false', then \Meta{default code} is executed.
+% \changes{3.0}{2022-08-10}{moved the patch from hycolor to correct Gray model, issue \#23}
 %    \begin{macrocode}
 \long\def\XC at ifcase#1#2#3%
  {\long\def\XC at if@##1##2%
@@ -6429,10 +6430,12 @@
 %
 % \begin{macro}{\XC at cnv@gray}
 %   \Meta{gray}|,|
+% \changes{3.0}{2022-08-10}{moved the patch from hycolor to correct Gray model, issue \#23}
 %    \begin{macrocode}
 \def\XC at cnv@gray#1,%
  {\XC at ifxcase\tm
    {\XC at mod@rgb {\XC at calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
+    \XC at mod@gray{}%
     \XC at mod@cmy {\XC at calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
     \XC at mod@cmyk{\XC at calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}}%
     \XC at mod@RGB {\edef\@@scl{\rangeRGB}\XC at calcM{#1}\@@tmp





More information about the latex3-commits mailing list.