summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/graphics-def/dvipdfmx.def
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-20 03:01:11 +0000
committerNorbert Preining <norbert@preining.info>2021-03-20 03:01:11 +0000
commitd3b06b2254431c03e127876a07ae654091314c72 (patch)
tree4fa5e40c55aae3ceeeab0048fabbb778ee06e284 /macros/latex/contrib/graphics-def/dvipdfmx.def
parent6ad1cf68ae6add67e56faf5ec4390fead04e31b4 (diff)
CTAN sync 202103200301
Diffstat (limited to 'macros/latex/contrib/graphics-def/dvipdfmx.def')
-rw-r--r--macros/latex/contrib/graphics-def/dvipdfmx.def34
1 files changed, 25 insertions, 9 deletions
diff --git a/macros/latex/contrib/graphics-def/dvipdfmx.def b/macros/latex/contrib/graphics-def/dvipdfmx.def
index a8ebdad500..0d73189fe2 100644
--- a/macros/latex/contrib/graphics-def/dvipdfmx.def
+++ b/macros/latex/contrib/graphics-def/dvipdfmx.def
@@ -17,7 +17,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{dvipdfmx.def}
- [2021/03/02 v5.0i Graphics/color driver for dvipdfmx]
+ [2021/03/18 v5.0j Graphics/color driver for dvipdfmx]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -260,8 +260,7 @@
\def\Gin@extensions{% order here is like xetex.def, except for PS
.pdf,.PDF,.ai,.AI,%
.png,.PNG,.jpg,.JPG,.jpeg,.JPEG,.jp2,.JP2,.jpf,.JPF,.bmp,.BMP,%
- .ps,.PS,.eps,.EPS,.mps,.MPS,%
- .pz,.eps.Z,.ps.Z,.ps.gz,.eps.gz}
+ .ps,.PS,.eps,.EPS,.mps,.MPS}
%
\@namedef{Gin@rule@.pdf}#1{{pdf}{.xbb}{#1}}
\@namedef{Gin@rule@.PDF}#1{{pdf}{.xbb}{#1}}
@@ -301,12 +300,6 @@
%
\@namedef{Gin@rule@.mps}#1{{mps}{.mps}{#1}}
\@namedef{Gin@rule@.MPS}#1{{mps}{.mps}{#1}}
-% (don't bother with uppercase versions for these Unixish extensions)
-\@namedef{Gin@rule@.pz}#1{{eps}{.xbb}{`gunzip -c #1}}
-\@namedef{Gin@rule@.eps.Z}#1{{eps}{.eps.xbb}{`gunzip -c #1}}
-\@namedef{Gin@rule@.ps.Z}#1{{eps}{.ps.xbb}{`gunzip -c #1}}
-\@namedef{Gin@rule@.ps.gz}#1{{eps}{.ps.xbb}{`gunzip -c #1}}
-\@namedef{Gin@rule@.eps.gz}#1{{eps}{.eps.xbb}{`gunzip -c #1}}
%
\@namedef{Gin@rule@*}#1{{eps}{\Gin@ext}{#1}}
\@ifundefined{ifGin@setpagesize}
@@ -336,6 +329,8 @@
}
\fi
\fi
+% Disable use of new multiple stacks pending further testing
+\endinput
% Updates for newer dvipdfmx versions
% Loaded last as we can then bail-out if not required
\begingroup
@@ -409,3 +404,24 @@
\def\reset@color{%
\special{pdfcolorstack \@pdfcolorstack pop}%
}
+% Reinsert stack color to over-ride built-in reinsertion of pdf:bc color
+\def\Grot@end{\special{pdf:etrans}\special{pdfcolorstack \@pdfcolorstack current}}
+\let\Gscale@end\Grot@end
+\def\GPT@clipbox#1{%
+ \setbox#1=\hbox{%
+ \Gin@defaultbp\WIDTH{\wd#1}%
+ \Gin@defaultbp\DEPTH{\dp#1}%
+ \@tempdima\ht#1%
+ \advance\@tempdima\dp#1%
+ \Gin@defaultbp\TOTALHEIGHT{\@tempdima}%
+ \special{x:gsave}%
+ \special{%
+ pdf:literal
+ 0 -\DEPTH\GPT@space \WIDTH\GPT@space \TOTALHEIGHT\GPT@space re W n
+ }%
+ \rlap{\box#1}%
+ \special{x:grestore}%
+ \special{pdfcolorstack \@pdfcolorstack current}%
+ \hskip\wd#1%
+ }%
+}