From 039db66bfaba704375a9543c918d1118770e42e3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Mar 2021 21:55:01 +0000 Subject: graphics-def (2mar21) git-svn-id: svn://tug.org/texlive/trunk@58059 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/graphics-def/dvipdfmx.def | 26 ++++++++++++++-------- Master/texmf-dist/tex/latex/graphics-def/xetex.def | 26 ++++++++++++++-------- 2 files changed, 34 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def b/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def index 30599167977..a8ebdad5007 100644 --- a/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/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/Master/texmf-dist/tex/latex/graphics-def/xetex.def b/Master/texmf-dist/tex/latex/graphics-def/xetex.def index 6f37ccc3d4a..25dd2cefa02 100644 --- a/Master/texmf-dist/tex/latex/graphics-def/xetex.def +++ b/Master/texmf-dist/tex/latex/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)}% -- cgit v1.2.3