summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/graphics-def/luatex.def
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/graphics-def/luatex.def')
-rw-r--r--macros/latex/contrib/graphics-def/luatex.def26
1 files changed, 21 insertions, 5 deletions
diff --git a/macros/latex/contrib/graphics-def/luatex.def b/macros/latex/contrib/graphics-def/luatex.def
index 102e8974c6..b32506d055 100644
--- a/macros/latex/contrib/graphics-def/luatex.def
+++ b/macros/latex/contrib/graphics-def/luatex.def
@@ -3,7 +3,7 @@
%% Hans Hagen, Heiko Oberdiek and
%% Martin Schr\"oder
%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
-%% Copyright (C) 2018-2020 LaTeX3 project
+%% Copyright (C) 2018-2022 LaTeX3 project
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -20,7 +20,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{luatex.def}
- [2021/06/01 v1.2c Graphics/color driver for luatex]
+ [2022/09/22 v1.2d Graphics/color driver for luatex]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
@@ -563,10 +563,26 @@
}{%
\ifdim\stockwidth>0pt\relax
\ifdim\stockheight>0pt\relax
- \pagewidth=\stockwidth
- \pageheight=\stockheight
+ \setlength{\pagewidth}{\stockwidth}%
+ \setlength{\pageheight}{\stockheight}%
+ \else
+ \ifdim\paperwidth>0pt\relax
+ \ifdim\paperheight>0pt\relax
+ \setlength{\pagewidth}{\paperwidth}%
+ \setlength{\pageheight}{\paperheight}%
+ \fi
+ \fi
\fi
- \fi
+ \else
+ \ifdim\stockwidth=0pt\relax
+ \ifdim\paperwidth>0pt\relax
+ \ifdim\paperheight>0pt\relax
+ \setlength{\pagewidth}{\paperwidth}%
+ \setlength{\pageheight}{\paperheight}%
+ \fi
+ \fi
+ \fi
+ \fi
}%
\fi
}