diff options
-rw-r--r-- | Master/texmf/tex/latex/dvipdfmx/dvipdfmx.def | 130 |
1 files changed, 110 insertions, 20 deletions
diff --git a/Master/texmf/tex/latex/dvipdfmx/dvipdfmx.def b/Master/texmf/tex/latex/dvipdfmx/dvipdfmx.def index e67d195de3d..742f83042ba 100644 --- a/Master/texmf/tex/latex/dvipdfmx/dvipdfmx.def +++ b/Master/texmf/tex/latex/dvipdfmx/dvipdfmx.def @@ -83,6 +83,105 @@ pdf:bgcolor \current@color}} \def\define@color@named#1#2{% \expandafter\let\csname col@#1\endcsname\@nnil} +% +% Graphics +% +\def\declareimagemask{% + \@ifnextchar[\declareimagemask@i{\declareimagemask@i[]}} +\def\declareimagemask@i[#1]#2#3{% + \special{pdf:image @#2\space hide (#3) #1}} + +\def\Gread@pdf#1{% + \begingroup + \@tempcnta\z@ + \loop\ifnum\@tempcnta<\@xxxii + \catcode\@tempcnta14 % + \advance\@tempcnta\@ne + \repeat + \catcode`\^^?14 % + \let\do\@makeother + \dospecials + \catcode`\ 10 % + \catcode`\^^I10 % + \catcode\endlinechar5 % + \@makeother\:% + \@makeother\-% + \immediate\openin\@inputcheck#1 % + \ifeof\@inputcheck + \immediate\write18{extractbb \Gin@base\Gin@ext} + \immediate\openin\@inputcheck#1 % + \fi + \ifeof\@inputcheck + \@latex@error{File `#1' not found. Use -shell-escape option to generate automatically}\@ehc + \else + \Gread@true + \let\@tempb\Gread@false + \loop + \read\@inputcheck to\@tempa + \ifeof\@inputcheck + \Gread@false + \else + \expandafter\Gread@find@bb\@tempa:.\\% + \fi + \ifGread@ + \repeat + \immediate\closein\@inputcheck + \fi + \ifGin@bbox\else + \@latex@error + {Cannot determine size of graphic in #1 (no BoundingBox)}% + \@ehc + \gdef\@gtempa{0 0 72 72 }% + \fi + \endgroup + \expandafter\Gread@parse@bb\@gtempa\\} +\let\Gread@bmp\Gread@pdf +\def\Gin@page{!} +\def\Gin@mask{!} +\newif\ifGin@interpolate\Gin@interpolatefalse +\@ifundefined{define@key}{}{% + \define@key{Gin}{page}{\def\Gin@page{#1}} + \define@key{Gin}{mask}{\def\Gin@mask{#1}} + \define@key{Gin}{interpolate}[true]{% + \lowercase{\Gin@boolkey{#1}}{interpolate}}} +\def\Ginclude@pdf#1{% + \message{<#1>}% + \bgroup + \def\@tempa{!}% + \special{pdf:epdf\space + \ifx\Gin@page\@tempa\else page\space\Gin@page\space\fi + bbox\space\Gin@llx\space\Gin@lly\space\Gin@urx\space\Gin@ury\space + clip\space\ifGin@clip 1\else 0\fi\space + \ifx\Gin@scalex\@tempa\else width\space\the\Gin@req@width\space\fi + \ifx\Gin@scaley\@tempa\else height\space\the\Gin@req@height\space\fi + (#1)\space + \ifx\Gin@mask\@tempa + \ifGin@interpolate<</Interpolate\space true>>\fi + \else + <</SMask @\Gin@mask\space% + \ifGin@interpolate/Interpolate\space true\fi>>% + \fi}% + \egroup} +\def\Ginclude@bmp#1{% + \message{<#1>}% + \bgroup + \def\@tempa{!}% + \special{pdf:image\space + \ifx\Gin@page\@tempa\else page\space\Gin@page\space\fi + \ifGin@bbox + bbox\space\Gin@llx\space\Gin@lly\space\Gin@urx\space\Gin@ury\space + clip\space\ifGin@clip 1\else 0\fi\space + \fi + \ifx\Gin@scalex\@tempa\else width\space\the\Gin@req@width\space\fi + \ifx\Gin@scaley\@tempa\else height\space\the\Gin@req@height\space\fi + (#1)\space + \ifx\Gin@mask\@tempa + \ifGin@interpolate<</Interpolate\space true>>\fi + \else + <</SMask @\Gin@mask\space% + \ifGin@interpolate/Interpolate\space true\fi>>% + \fi}% + \egroup} \def\Ginclude@eps#1{% \message{<#1>}% \bgroup @@ -101,15 +200,6 @@ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi \ifGin@clip clip\fi}% \egroup} -\def\Ginclude@bmp#1{% - \message{<#1>}% - \bgroup - \def\@tempa{!}% - \special{pdf:image\space - width \the\Gin@req@width\space - height \the\Gin@req@height\space - (#1)}% - \egroup} \def\Grot@start{% \special{pdf:btrans rotate \Grot@angle}} \def\Grot@end{\special{pdf:etrans}} @@ -120,19 +210,19 @@ \def\Gin@PS@restored#1{\special{" #1}} \def\Gin@PS@literal@header#1{\AtBeginDvi{\special{! #1}}} \def\Gin@PS@file@header#1{\AtBeginDvi{\special{header=#1}}} -\@namedef{Gin@rule@.jpg}#1{{bmp}{.bb}{#1}} -\@namedef{Gin@rule@.jpeg}#1{{bmp}{.bb}{#1}} -\@namedef{Gin@rule@.png}#1{{bmp}{.bb}{#1}} -\@namedef{Gin@rule@.bmp}#1{{bmp}{.bb}{#1}} -\def\Gin@extensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z} -\@namedef{Gin@rule@.pdf}#1{{eps}{.bb}{#1}} +\def\Gin@extensions{.pdf,.jpg,.jpeg,.png,.bmp,.ps,.eps,.pz,.eps.Z,.ps.Z,.ps.gz,.eps.gz} +\@namedef{Gin@rule@.pdf}#1{{pdf}{.xbb}{#1}} +\@namedef{Gin@rule@.jpg}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.jpeg}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.png}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.bmp}#1{{bmp}{.xbb}{#1}} \@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}} \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}} -\@namedef{Gin@rule@.pz}#1{{eps}{.bb}{`gunzip -c #1}} -\@namedef{Gin@rule@.eps.Z}#1{{eps}{.eps.bb}{`gunzip -c #1}} -\@namedef{Gin@rule@.ps.Z}#1{{eps}{.ps.bb}{`gunzip -c #1}} -\@namedef{Gin@rule@.ps.gz}#1{{eps}{.ps.bb}{`gunzip -c #1}} -\@namedef{Gin@rule@.eps.gz}#1{{eps}{.eps.bb}{`gunzip -c #1}} +\@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}} \endinput %% |