diff options
Diffstat (limited to 'macros/latex/contrib/graphics-def/dvipdfmx.def')
-rw-r--r-- | macros/latex/contrib/graphics-def/dvipdfmx.def | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/macros/latex/contrib/graphics-def/dvipdfmx.def b/macros/latex/contrib/graphics-def/dvipdfmx.def index 1d82661b11..ce1f10c3b6 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} - [2022/04/16 v5.0l Graphics/color driver for dvipdfmx] + [2022/09/22 v5.0m Graphics/color driver for dvipdfmx] \def\GPT@space{ } \def\c@lor@arg#1{% \dimen@#1\p@ @@ -306,6 +306,8 @@ {\expandafter\let\csname ifGin@setpagesize\expandafter\endcsname \csname iftrue\endcsname} {} +\@ifundefined{stockwidth}{\newdimen\stockwidth}{} +\@ifundefined{stockheight}{\newdimen\stockheight}{} \ifGin@setpagesize \ifx\paperwidth\@undefined\else \AtBeginDocument{% @@ -314,16 +316,25 @@ \ifnum\mag=\@m \AtBeginDvi{% \begingroup - \@ifundefined{stockwidth}{} - {% - \paperwidth\stockwidth - \paperheight\stockheight - }% -\ifdim\paperwidth>\z@ -\ifdim\paperheight>\z@ -\special{pdf:pagesize width \the\paperwidth\GPT@space height \the\paperheight}% -\fi -\fi + \ifdim\stockwidth>\z@ + \ifdim\stockheight>\z@ + \special{papersize=\the\stockwidth,\the\stockheight}% + \else + \ifdim\paperwidth>\z@ + \ifdim\paperheight>\z@ + \special{papersize=\the\paperwidth,\the\paperheight}% + \fi + \fi + \fi + \else + \ifdim\stockwidth=\z@ + \ifdim\paperwidth>\z@ + \ifdim\paperheight>\z@ + \special{papersize=\the\paperwidth,\the\paperheight}% + \fi + \fi + \fi + \fi \endgroup}% \fi } |