summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/graphics-def/pdftex.def
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-02 03:03:35 +0000
committerNorbert Preining <norbert@preining.info>2020-09-02 03:03:35 +0000
commit66aedee32b96d68acc7b854602552c75ef261973 (patch)
treee2695c9462f5e3202dd827cea9648463f933b80e /macros/latex/contrib/graphics-def/pdftex.def
parenta9726d029d99c128a7abb22e73074ba0a1ce838e (diff)
CTAN sync 202009020303
Diffstat (limited to 'macros/latex/contrib/graphics-def/pdftex.def')
-rw-r--r--macros/latex/contrib/graphics-def/pdftex.def72
1 files changed, 66 insertions, 6 deletions
diff --git a/macros/latex/contrib/graphics-def/pdftex.def b/macros/latex/contrib/graphics-def/pdftex.def
index 0c9d2da548..ac6ca6fe48 100644
--- a/macros/latex/contrib/graphics-def/pdftex.def
+++ b/macros/latex/contrib/graphics-def/pdftex.def
@@ -1,7 +1,9 @@
-%% pdftex.def Copyright (C) 2000-2015 David Carlisle, Sebastian Rahtz,
-%% Hans Hagen, Heiko Oberdiek and
-%% Martin Schr\"oder
-%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
+%% pdftex.def
+%% Copyright (C) 2000-2015 David Carlisle, Sebastian Rahtz,
+%% Hans Hagen, Heiko Oberdiek and
+%% Martin Schr\"oder
+%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
+%% Copyright (C) 2018-2020 LaTeX3 project
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -18,7 +20,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{pdftex.def}
- [2018/01/08 v1.0l Graphics/color driver for pdftex]
+ [2020/08/26 v1.2 Graphics/color driver for pdftex]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -139,6 +141,33 @@ E \else
\def\no@page@color{%
\global\GPT@pagecolorfalse
}
+
+\def\@tempa{LaTeX2e}%
+\ifx\fmtname\@tempa
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+ {%
+ \@ifl@t@r\fmtversion{2020/10/01}
+ {%
+ \def\set@page@color{%
+ \global\GPT@pagecolortrue
+ \global\let\current@page@color\current@color
+ }%
+ \g@addto@macro\@kernel@before@shipout@background
+ {%
+ \ifGPT@pagecolor
+ \put(-\hoffset,-\pdfpageheight+\voffset)%
+ {%
+ \pdfcolorstack\@pdfcolorstack push{\current@page@color}%
+ \aftergroup\reset@color
+ \rule{\pdfpagewidth}{\pdfpageheight}%
+ }%
+ \fi
+ }%
+ }%
+ }
\AtBeginDocument{%
\def\KV@Gin@bbllx{%
\PackageError{pdftex.def}{%
@@ -155,10 +184,41 @@ E \else
\let\KV@Gin@natheight\KV@Gin@bbllx
\def\KV@Gin@bb{%
\PackageInfo{pdftex.def}%
- {Option `bb' equivalent to `viewport' with pdftex driver}%
+ {Option `bb' equivalent to `viewport' with the pdftex driver}%
\KV@Gin@viewport
}%
+ \let\Gin@iii\Gin@iii@vp
}
+
+%%% this definition will be added to graphics.sty
+\def\Gin@iii@vp[#1,#2][#3,#4]#5{%
+ \begingroup
+ \let\Gin@viewport@code\Gin@viewport
+ \Gin@defaultbp\Gin@vllx{#1}%
+ \Gin@defaultbp\Gin@vlly{#2}%
+ \Gin@defaultbp\Gin@vurx{#3}%
+ \Gin@defaultbp\Gin@vury{#4}%
+ \Ginclude@graphics{#5}%
+ \endgroup}
+
+
+%%% this definition needs moving from graphicx.sty to graphics.sty
+\def\Gin@viewport{%
+ \let\Gin@ollx\Gin@llx
+ \let\Gin@olly\Gin@lly
+ \let\Gin@ourx\Gin@urx
+ \let\Gin@oury\Gin@ury
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vurx\p@
+ \edef\Gin@urx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vury\p@
+ \edef\Gin@ury{\strip@pt\dimen@}%
+ \dimen@\Gin@llx\p@\advance\dimen@ \Gin@vllx\p@
+ \edef\Gin@llx{\strip@pt\dimen@}%
+ \dimen@\Gin@lly\p@\advance\dimen@ \Gin@vlly\p@
+ \edef\Gin@lly{\strip@pt\dimen@}}
+%%% end of temp addition
+
+
\def\Gread@pdftex#1{%
\expandafter\ifx\expandafter\relax\pdffilesize{#1}\relax
\expandafter\@secondoftwo