[latex3-commits] [git/LaTeX3-latex3-latex2e] color: Store colors for l3color manipulation (9867154e)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jun 4 17:58:55 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : color
Link       : https://github.com/latex3/latex2e/commit/9867154ee1b7f7e3ed940867a6afb989ea4a8d55

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

commit 9867154ee1b7f7e3ed940867a6afb989ea4a8d55
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jun 4 16:58:34 2020 +0100

    Store colors for l3color manipulation


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

9867154ee1b7f7e3ed940867a6afb989ea4a8d55
 required/graphics/changes.txt |  4 ++++
 required/graphics/color.dtx   | 25 ++++++++++++++++++++++---
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/required/graphics/changes.txt b/required/graphics/changes.txt
index bbe1893e..8b51bd2a 100644
--- a/required/graphics/changes.txt
+++ b/required/graphics/changes.txt
@@ -4,6 +4,10 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2020-05-29  Joseph Wright  <joseph.wright at latex-project.org>
+
+	* color.dtx: Store color data for expl3 manipulation
+
 2020-05-28  David Carlisle  <David.Carlisle at latex-project.org>
 
 	* lscape.dtx: delay saving \cs{@makefcolumn} gh340
diff --git a/required/graphics/color.dtx b/required/graphics/color.dtx
index cdc2dbe5..b7c9d99f 100644
--- a/required/graphics/color.dtx
+++ b/required/graphics/color.dtx
@@ -19,7 +19,7 @@
 %<driver> \ProvidesFile{color.drv}
 % \fi
 %         \ProvidesFile{color.dtx}
-          [2020/02/24 v1.2b Standard LaTeX Color (DPC)]
+          [2020/05/24 v1.2c Standard LaTeX Color (DPC)]
 %
 % \iffalse
 %<*driver>
@@ -539,6 +539,8 @@
 %     {Give info about redefinitions}
 % \changes{v1.2a}{2019/11/23}
 %      {Add \cs{protected} gh/208}
+% \changes{v1.2c}{2020/05/29}
+%      {Add support for \textsf{l3color}}
 %    \begin{macrocode}
 \protected\def\definecolor#1#2#3{%
   \@ifundefined{color@#2}%
@@ -546,11 +548,12 @@
     {\@ifundefined{\string\color @#1}{}%
       {\PackageInfo{color}{Redefining color #1}}%
      \csname color@#2\expandafter\endcsname
-         \csname\string\color @#1\endcsname{#3}}}
+         \csname\string\color @#1\endcsname{#3}}%
+    \@expl at color@set at nnn{#1}{#2}{#3}%
+  }
 %    \end{macrocode}
 %  \end{macro}
 %
-%
 %  \begin{macro}{\DefineNamedColor}
 % \changes{v0.3d}{1994/09/29}
 %     {Macro added}
@@ -560,6 +563,8 @@
 %     {Give info about redefinitions}
 % \changes{v1.2b}{2020/02/24}
 %     {corrected test, see https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics/3635}
+% \changes{v1.2c}{2020/05/29}
+%      {Add support for \textsf{l3color}}
 %
 % Driver files may opt to define a `named' colour model.
 % Placing colour names rather than numeric specifications into the dvi
@@ -608,12 +613,26 @@
       {\@ifundefined{col@#2}{}%
         {\PackageInfo{color}{Redefining color #2 in named color model}}%
       \csname color@#3\endcsname\@tempa{#4}%
+    \@expl at color@set at nnn{#1}{#2}{#3}%
       \csname define at color@#1\endcsname{#2}\@tempa
       \c at lor@usename{#2}}}}
 \@onlypreamble\DefineNamedColor
 %    \end{macrocode}
 %  \end{macro}
 %
+%  \begin{macro}{\@expl at color@set at nnn}
+%    Abstracted support for sending data to \textsf{expl3}.
+%    \begin{macrocode}
+\protected\def\@expl at color@set at nnn#1#2#3{}
+\ifdefined\ExplSyntaxOn
+  \ExplSyntaxOn
+    \cs_if_exist:NT \color_set:nnn
+      { \cs_gset_eq:NN \@expl at color@set at nnn \color_set:nnn }
+  \ExplSyntaxOff
+\fi
+%    \end{macrocode}
+%  \end{macro}
+%
 % \section{Colour Switch}
 %
 %  \begin{macro}{\ifcolors@}





More information about the latex3-commits mailing list.