texlive[57951] Master/texmf-dist: graphics-def (26feb21)
commits+karl at tug.org
commits+karl at tug.org
Fri Feb 26 23:22:52 CET 2021
Revision: 57951
http://tug.org/svn/texlive?view=revision&revision=57951
Author: karl
Date: 2021-02-26 23:22:51 +0100 (Fri, 26 Feb 2021)
Log Message:
-----------
graphics-def (26feb21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/graphics-def/README.md
trunk/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def
trunk/Master/texmf-dist/tex/latex/graphics-def/xetex.def
Modified: trunk/Master/texmf-dist/doc/latex/graphics-def/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphics-def/README.md 2021-02-26 22:22:37 UTC (rev 57950)
+++ trunk/Master/texmf-dist/doc/latex/graphics-def/README.md 2021-02-26 22:22:51 UTC (rev 57951)
@@ -1,7 +1,7 @@
LaTeX support for color and graphics
====================================
-Release 2020-10-05
+Release 2021-02-26
This bundle contains the 'engine-dependent' part of support for
color and graphics in LaTeX2e (the code here will also function
Modified: trunk/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def 2021-02-26 22:22:37 UTC (rev 57950)
+++ trunk/Master/texmf-dist/tex/latex/graphics-def/dvipdfmx.def 2021-02-26 22:22:51 UTC (rev 57951)
@@ -336,3 +336,68 @@
}
\fi
\fi
+% Updates for newer dvipdfmx versions
+% Loaded last as we can then bail-out if not required
+\begingroup
+ \ifcsname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname
+ \edef\extractbbversion{%
+ \number\csname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname}%
+ \else
+ \immediate\openin 0 = |"extractbb --version"
+ \ifeof0 %
+ \def\extractbbversion{0}%
+ \else
+ \read0 to \extractbbversion % \par
+ \ifeof0 %
+ \def\extractbbversion{0}%
+ \else
+ \read0 to \extractbbversion
+ \long\def\getextractbbversion#1Version #2 #3\stop{%
+ \def\extractbbversion{#2}}%
+ \expandafter\getextractbbversion\extractbbversion Version 0 \stop
+ \fi
+ \fi
+ \fi
+\ifnum\extractbbversion<20201111 %
+ \endgroup
+ \expandafter\endinput
+\else
+ \endgroup
+\fi
+% Conversion functions so the internal representation stays unchanged
+\let\init at current@color\current at color
+\def\convert at color#1{%
+ \ifx#1\init at current@color
+ \expandafter\convert at color@init
+ \else
+ \expandafter\convert@@color
+ \fi
+ #1%
+}
+\def\convert at color@init#1{0 g 0 G}
+\def\convert@@color#1{%
+ \expandafter\expandafter\expandafter\convert@@@color#1\stop
+}
+\def\convert@@@color#1 #2\stop{%
+ \csname convert at color@#1\endcsname{#2}%
+}
+\def\convert at color@cmyk#1{#1 k #1 K}
+\def\convert at color@gray#1{#1 g #1 G}
+\def\convert at color@rgb#1{#1 rg #1 RG}
+% Change the specials to use the stack
+\chardef\main at pdfcolorstack=1 %
+\ifx\AtBeginDvi\undefined
+ \long\def\@firstofone#1{#1}%
+ \expandafter\@firstofone
+\else
+ \expandafter\AtBeginDvi
+\fi
+ {\special{pdfcolorstackinit \the\main at pdfcolorstack\space page direct (0 g 0 G)}}
+\def\@pdfcolorstack{\the\main at pdfcolorstack\space}
+\def\set at color{%
+ \special{pdfcolorstack \@pdfcolorstack push (\convert at color\current at color)}%
+ \aftergroup \reset at color
+}
+\def\reset at color{%
+ \special{pdfcolorstack \@pdfcolorstack pop}%
+}
Modified: trunk/Master/texmf-dist/tex/latex/graphics-def/xetex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/graphics-def/xetex.def 2021-02-26 22:22:37 UTC (rev 57950)
+++ trunk/Master/texmf-dist/tex/latex/graphics-def/xetex.def 2021-02-26 22:22:51 UTC (rev 57951)
@@ -435,3 +435,68 @@
}
\fi
\fi
+% Updates for newer dvipdfmx versions
+% Loaded last as we can then bail-out if not required
+\begingroup
+ \ifcsname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname
+ \edef\extractbbversion{%
+ \number\csname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname}%
+ \else
+ \immediate\openin 0 = |"extractbb --version"
+ \ifeof0 %
+ \def\extractbbversion{0}%
+ \else
+ \read0 to \extractbbversion % \par
+ \ifeof0 %
+ \def\extractbbversion{0}%
+ \else
+ \read0 to \extractbbversion
+ \long\def\getextractbbversion#1Version #2 #3\stop{%
+ \def\extractbbversion{#2}}%
+ \expandafter\getextractbbversion\extractbbversion Version 0 \stop
+ \fi
+ \fi
+ \fi
+\ifnum\extractbbversion<20201111 %
+ \endgroup
+ \expandafter\endinput
+\else
+ \endgroup
+\fi
+% Conversion functions so the internal representation stays unchanged
+\let\init at current@color\current at color
+\def\convert at color#1{%
+ \ifx#1\init at current@color
+ \expandafter\convert at color@init
+ \else
+ \expandafter\convert@@color
+ \fi
+ #1%
+}
+\def\convert at color@init#1{0 g 0 G}
+\def\convert@@color#1{%
+ \expandafter\expandafter\expandafter\convert@@@color#1\stop
+}
+\def\convert@@@color#1 #2\stop{%
+ \csname convert at color@#1\endcsname{#2}%
+}
+\def\convert at color@cmyk#1{#1 k #1 K}
+\def\convert at color@gray#1{#1 g #1 G}
+\def\convert at color@rgb#1{#1 rg #1 RG}
+% Change the specials to use the stack
+\chardef\main at pdfcolorstack=1 %
+\ifx\AtBeginDvi\undefined
+ \long\def\@firstofone#1{#1}%
+ \expandafter\@firstofone
+\else
+ \expandafter\AtBeginDvi
+\fi
+ {\special{pdfcolorstackinit \the\main at pdfcolorstack\space page direct (0 g 0 G)}}
+\def\@pdfcolorstack{\the\main at pdfcolorstack\space}
+\def\set at color{%
+ \special{pdfcolorstack \@pdfcolorstack push (\convert at color\current at color)}%
+ \aftergroup \reset at color
+}
+\def\reset at color{%
+ \special{pdfcolorstack \@pdfcolorstack pop}%
+}
More information about the tex-live-commits
mailing list.