[latex3-commits] [latex3/graphics-def] XC-color: simplify call to protected macro (6664150)

github at latex-project.org github at latex-project.org
Sat Dec 9 21:50:48 CET 2023


Repository : https://github.com/latex3/graphics-def
On branch  : XC-color
Link       : https://github.com/latex3/graphics-def/commit/6664150d61bd22e89654b8ed40124ffd4ba63b34

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

commit 6664150d61bd22e89654b8ed40124ffd4ba63b34
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Dec 9 20:50:48 2023 +0000

    simplify call to protected macro


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

6664150d61bd22e89654b8ed40124ffd4ba63b34
 pdftex.def | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/pdftex.def b/pdftex.def
index d00615b..e5fa381 100644
--- a/pdftex.def
+++ b/pdftex.def
@@ -1,4 +1,4 @@
-%% pdftex.def
+
 %% Copyright (C) 2000-2015 David Carlisle, Sebastian Rahtz,
 %%                         Hans Hagen, Heiko Oberdiek and
 %%                         Martin Schr\"oder
@@ -25,7 +25,6 @@
 \ifx\xcolor@\@undefined
 \protected\def\xcolor@#1#2#3#4{#2}
 \fi
-\def\GPT at xcolor@{\xcolor@}
 
 \def\c at lor@arg#1{%
   \dimen@#1\p@
@@ -35,7 +34,7 @@
   \fi}
 \def\color at gray#1#2{%
   \c at lor@arg{#2}%
-  \edef#1{\GPT at xcolor@{}{#2 g #2 G}{\detokenize{gray}}{#2}}%
+  \edef#1{\xcolor@{}{#2 g #2 G}{\detokenize{gray}}{#2}}%
   }
 \def\color at cmyk#1#2{\c at lor@@cmyk#2\@@#1}
 \def\c at lor@@cmyk#1,#2,#3,#4\@@#5{%
@@ -43,14 +42,14 @@
   \c at lor@arg{#1}%
   \c at lor@arg{#2}%
   \c at lor@arg{#3}%
-  \edef#5{\GPT at xcolor@{}{#1 #2 #3 #4 k #1 #2 #3 #4 K}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
+  \edef#5{\xcolor@{}{#1 #2 #3 #4 k #1 #2 #3 #4 K}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
   }
 \def\color at rgb#1#2{\c at lor@@rgb#2\@@#1}
 \def\c at lor@@rgb#1,#2,#3\@@#4{%
   \c at lor@arg{#1}%
   \c at lor@arg{#2}%
   \c at lor@arg{#3}%
-  \edef#4{\GPT at xcolor@{}{#1 #2 #3 rg #1 #2 #3 RG}{\detokenize{rgb}}{#1,#2,#3}}%
+  \edef#4{\xcolor@{}{#1 #2 #3 rg #1 #2 #3 RG}{\detokenize{rgb}}{#1,#2,#3}}%
   }
 \def\color at RGB#1#2{\c at lor@@RGB#2\@@#1}
 \def\c at lor@@RGB#1,#2,#3\@@#4{%
@@ -67,7 +66,7 @@
 \def\c at lor@@named#1,#2,#3\@@#4{%
   \@ifundefined{col@#1}%
     {\PackageError{color}{Undefined color `#1'}\@ehd}%
-  {%\expandafter\show\csname col@#1\endcsname
+  {%
   \edef#4{\csname col@#1\endcsname}}%
   }
 \chardef\main at pdfcolorstack=0 %





More information about the latex3-commits mailing list.