[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop, main: simplify color patch (2eda314)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Aug 24 12:15:59 CEST 2022


Repository : https://github.com/latex3/pdfresources
On branches: develop,main
Link       : https://github.com/latex3/pdfresources/commit/2eda31477722084746a037594eace2cc15a01b1e

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

commit 2eda31477722084746a037594eace2cc15a01b1e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed Aug 24 12:15:59 2022 +0200

    simplify color patch


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

2eda31477722084746a037594eace2cc15a01b1e
 firstaid/color-ltx.sty | 33 +++++++++++++--------------------
 1 file changed, 13 insertions(+), 20 deletions(-)

diff --git a/firstaid/color-ltx.sty b/firstaid/color-ltx.sty
index 6873467..7400b4b 100644
--- a/firstaid/color-ltx.sty
+++ b/firstaid/color-ltx.sty
@@ -24,7 +24,7 @@
 %% This file has the LPPL maintenance status "maintained".
 %%
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{color-ltx}[2022-07-08 v0.95q
+\ProvidesPackage{color-ltx}[2022-08-24 v0.95r
   Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2022/01/06 v1.3d) (DPC)]
 \edef\Gin at codes{%
  \catcode`\noexpand\^^A\the\catcode`\^^A\relax
@@ -136,25 +136,18 @@
       \c at lor@usename{#2}}}}
 \@onlypreamble\DefineNamedColor
 \protected\def\@expl at color@set@@nnn#1#2#3{}
-\ifdefined\ExplSyntaxOn
-  \ExplSyntaxOn
-  \cs_gset_protected:Npn \@expl at color@set@@nnn #1 #2 #3
-   {
-    \cs_if_exist:NT \color_set:nnn
-      { \cs_if_exist:cTF { __color_parse_model_ #2 :w }
-         {
-          \color_set:nnn {#1}{#2}{#3}
-         }
-         { %for dvi mode
-          \tl_if_eq:nnT{#2}{named}
-           {
-             \color_set:nn{#1}{#3}
-           }
-         }
-     }
-   }
-  \ExplSyntaxOff
-\fi
+\ExplSyntaxOn
+\cs_set_protected:Npn \@expl at color@set@@nnn #1 #2 #3
+  {
+   \str_if_eq:nnTF {#2}{named}
+    {
+      \color_set:nn {#1}{#3}
+    }
+    {
+      \color_set:nnn {#1}{#2}{#3}
+    }
+  }
+\ExplSyntaxOff
 \newif\ifcolors@
 \colors at true
 \def\c at lor@special#1#2{%





More information about the latex3-commits mailing list.