[latex3-commits] [latex3/graphics-def] XC-color: lualatex (ad77544)

github at latex-project.org github at latex-project.org
Sat Dec 9 22:20:29 CET 2023


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

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

commit ad775443dcae88db8eac044756ac2d640fb09149
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Dec 9 21:20:29 2023 +0000

    lualatex


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

ad775443dcae88db8eac044756ac2d640fb09149
 luatex.def | 13 ++++++++-----
 pdftex.def |  3 +--
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/luatex.def b/luatex.def
index b32506d..874c45e 100644
--- a/luatex.def
+++ b/luatex.def
@@ -3,7 +3,7 @@
 %%                         Hans Hagen, Heiko Oberdiek and
 %%                         Martin Schr\"oder
 %% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
-%% Copyright (C) 2018-2022 LaTeX3 project
+%% Copyright (C) 2018-2023 LaTeX3 project
 %%
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3c
@@ -20,8 +20,11 @@
 %% https://github.com/latex3/graphics-def/issues
 %%
 \ProvidesFile{luatex.def}
-  [2022/09/22 v1.2d Graphics/color driver for luatex]
+  [2023/12/09 v1.3a Graphics/color driver for luatex]
 \def\GPT at space{ }
+\ifx\xcolor@\@undefined
+  \protected\def\xcolor@#1#2#3#4{#2}
+\fi
 \def\c at lor@arg#1{%
   \dimen@#1\p@
   \ifdim\dimen@<\z@\dimen@\maxdimen\fi
@@ -30,7 +33,7 @@
   \fi}
 \def\color at gray#1#2{%
   \c at lor@arg{#2}%
-  \edef#1{#2 g #2 G}%
+  \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{%
@@ -38,14 +41,14 @@
   \c at lor@arg{#1}%
   \c at lor@arg{#2}%
   \c at lor@arg{#3}%
-  \edef#5{#1 #2 #3 #4 k #1 #2 #3 #4 K}%
+  \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{#1 #2 #3 rg #1 #2 #3 RG}%
+  \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{%
diff --git a/pdftex.def b/pdftex.def
index e5fa381..cda4cb9 100644
--- a/pdftex.def
+++ b/pdftex.def
@@ -23,9 +23,8 @@
   [2023/12/09 v1.3a Graphics/color driver for pdftex]
 \def\GPT at space{ }
 \ifx\xcolor@\@undefined
-\protected\def\xcolor@#1#2#3#4{#2}
+  \protected\def\xcolor@#1#2#3#4{#2}
 \fi
-
 \def\c at lor@arg#1{%
   \dimen@#1\p@
   \ifdim\dimen@<\z@\dimen@\maxdimen\fi





More information about the latex3-commits mailing list.