diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/plain/contrib/epsf-dvipdfmx/epsf-dvipdfmx.tex |
Initial commit
Diffstat (limited to 'macros/plain/contrib/epsf-dvipdfmx/epsf-dvipdfmx.tex')
-rw-r--r-- | macros/plain/contrib/epsf-dvipdfmx/epsf-dvipdfmx.tex | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/macros/plain/contrib/epsf-dvipdfmx/epsf-dvipdfmx.tex b/macros/plain/contrib/epsf-dvipdfmx/epsf-dvipdfmx.tex new file mode 100644 index 0000000000..b6267dde1b --- /dev/null +++ b/macros/plain/contrib/epsf-dvipdfmx/epsf-dvipdfmx.tex @@ -0,0 +1,56 @@ +% epsf-dvipdfmx.tex - \input after epsf.tex when using dvipdfmx +% Originally written by Akira Kakuto, 2014. Public domain. +% +% (x)dvipdfmx patch for epsf.tex - translate bounding box to have (0,0) LL. +% +\newdimen\epsfdpxtexdimen +% +% from latex.ltx +% +\begingroup + \catcode`P=12 + \catcode`T=12 + \lowercase{\def\x{\def\rempt##1.##2PT{##1\ifnum##2>0pt.##2\fi}}} + \expandafter\endgroup\x +\def\strippt{\expandafter\rempt\the} +% +\def \epsfspecial #1{% + \epsftmp=10\epsfxsize + \divide \epsftmp by \pspoints + \ifnum \epsfrsize = 0% + \relax + \epsfdpxtexdimen=\epsfurx pt + \advance\epsfdpxtexdimen -\epsfllx pt + \edef\epsfurxx{\strippt\epsfdpxtexdimen}% + \epsfdpxtexdimen=\epsfury pt + \advance\epsfdpxtexdimen -\epsflly pt + \edef\epsfuryy{\strippt\epsfdpxtexdimen}% + \special{PSfile=\ifepsfdraft psdraft.ps\else#1\fi\space + llx=0\space + lly=0\space + urx=\epsfurxx\space + ury=\epsfuryy\space + rwi=\number\epsftmp + \epsfclipstring + }% + \else + \epsfrsize=10\epsfysize + \divide \epsfrsize by \pspoints + \epsfdpxtexdimen=\epsfurx pt + \advance\epsfdpxtexdimen -\epsfllx pt + \edef\epsfurxx{\strippt\epsfdpxtexdimen}% + \epsfdpxtexdimen=\epsfury pt + \advance\epsfdpxtexdimen -\epsflly pt + \edef\epsfuryy{\strippt\epsfdpxtexdimen}% + \special{PSfile=\ifepsfdraft psdraft.ps\else#1\fi\space + llx=0\space + lly=0\space + urx=\epsfurxx\space + ury=\epsfuryy\space + rwi=\number\epsftmp + rhi=\number\epsfrsize + \epsfclipstring + }% + \fi +}% +\endinput |