summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/graphics-def
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-03 03:01:26 +0000
committerNorbert Preining <norbert@preining.info>2021-03-03 03:01:26 +0000
commit6a1383661dd7817761345a9d4ddfd9db6ba2dd1e (patch)
treedec33644ee8df10255c235853ff6ef809b223a90 /macros/latex/contrib/graphics-def
parent4763ec8ceefaf2b038d591b8c15d88d081aec6c9 (diff)
CTAN sync 202103030301
Diffstat (limited to 'macros/latex/contrib/graphics-def')
-rw-r--r--macros/latex/contrib/graphics-def/dvipdfmx.def26
-rw-r--r--macros/latex/contrib/graphics-def/xetex.def26
2 files changed, 34 insertions, 18 deletions
diff --git a/macros/latex/contrib/graphics-def/dvipdfmx.def b/macros/latex/contrib/graphics-def/dvipdfmx.def
index 3059916797..a8ebdad500 100644
--- a/macros/latex/contrib/graphics-def/dvipdfmx.def
+++ b/macros/latex/contrib/graphics-def/dvipdfmx.def
@@ -1,5 +1,5 @@
%% dvipdfmx.def
-%% Copyright (C) 2005-2020 LaTeX3 Project, Jin-Hwan Cho, Shunsaku Hirata
+%% Copyright (C) 2005-2021 LaTeX3 Project, Jin-Hwan Cho, Shunsaku Hirata
%% (with contributions from many others)
%%
%% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{dvipdfmx.def}
- [2020/08/26 v5.0h Graphics/color driver for dvipdfmx]
+ [2021/03/02 v5.0i Graphics/color driver for dvipdfmx]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -384,15 +384,23 @@
\def\convert@color@cmyk#1{#1 k #1 K}
\def\convert@color@gray#1{#1 g #1 G}
\def\convert@color@rgb#1{#1 rg #1 RG}
+\def\convert@color@#1{%
+ \expandafter\expandafter\expandafter\convert@@color
+ \expandafter\expandafter\expandafter{\csname col@#1\endcsname}%
+}
+% Deal with named colors
+\def\define@color@named#1#2{\expandafter\edef\csname col@#1\endcsname{#2}}
% Change the specials to use the stack
-\chardef\main@pdfcolorstack=1 %
-\ifx\AtBeginDvi\undefined
- \long\def\@firstofone#1{#1}%
- \expandafter\@firstofone
-\else
- \expandafter\AtBeginDvi
+\ifdefined\main@pdfcolorstack\else
+ \chardef\main@pdfcolorstack=1 %
+ \ifx\AtBeginDvi\undefined
+ \long\def\@firstofone#1{#1}%
+ \expandafter\@firstofone
+ \else
+ \expandafter\AtBeginDvi
+ \fi
+ {\special{pdfcolorstackinit \the\main@pdfcolorstack\space page direct (0 g 0 G)}}
\fi
- {\special{pdfcolorstackinit \the\main@pdfcolorstack\space page direct (0 g 0 G)}}
\def\@pdfcolorstack{\the\main@pdfcolorstack\space}
\def\set@color{%
\special{pdfcolorstack \@pdfcolorstack push (\convert@color\current@color)}%
diff --git a/macros/latex/contrib/graphics-def/xetex.def b/macros/latex/contrib/graphics-def/xetex.def
index 6f37ccc3d4..25dd2cefa0 100644
--- a/macros/latex/contrib/graphics-def/xetex.def
+++ b/macros/latex/contrib/graphics-def/xetex.def
@@ -1,5 +1,5 @@
%% xetex.def
-%% Copyright (C) 2005-2020 LaTeX3 Project, Jin-Hwan Cho, Shunsaku Hirata
+%% Copyright (C) 2005-2021 LaTeX3 Project, Jin-Hwan Cho, Shunsaku Hirata
%% (with contributions from many others)
%%
%% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{xetex.def}
- [2020/08/26 v5.0i Graphics/color driver for xetex]
+ [2021/03/02 v5.0j Graphics/color driver for xetex]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -483,15 +483,23 @@
\def\convert@color@cmyk#1{#1 k #1 K}
\def\convert@color@gray#1{#1 g #1 G}
\def\convert@color@rgb#1{#1 rg #1 RG}
+\def\convert@color@#1{%
+ \expandafter\expandafter\expandafter\convert@@color
+ \expandafter\expandafter\expandafter{\csname col@#1\endcsname}%
+}
+% Deal with named colors
+\def\define@color@named#1#2{\expandafter\edef\csname col@#1\endcsname{#2}}
% Change the specials to use the stack
-\chardef\main@pdfcolorstack=1 %
-\ifx\AtBeginDvi\undefined
- \long\def\@firstofone#1{#1}%
- \expandafter\@firstofone
-\else
- \expandafter\AtBeginDvi
+\ifdefined\main@pdfcolorstack\else
+ \chardef\main@pdfcolorstack=1 %
+ \ifx\AtBeginDvi\undefined
+ \long\def\@firstofone#1{#1}%
+ \expandafter\@firstofone
+ \else
+ \expandafter\AtBeginDvi
+ \fi
+ {\special{pdfcolorstackinit \the\main@pdfcolorstack\space page direct (0 g 0 G)}}
\fi
- {\special{pdfcolorstackinit \the\main@pdfcolorstack\space page direct (0 g 0 G)}}
\def\@pdfcolorstack{\the\main@pdfcolorstack\space}
\def\set@color{%
\special{pdfcolorstack \@pdfcolorstack push (\convert@color\current@color)}%