%% This is file `dvipdfmx.def' for DVIPDFMx by J.-H. Cho and S. Hirata
%% which is written based on `dvipdf.def' in the LaTeX `Graphics Bundle'.
%%
%% This was file `dvipdf.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% drivers.dtx  (with options: `dvipdf,color1,psrulesZ')
%% 
%% drivers.dtx Copyright (C) 1994      David Carlisle Sebastian Rahtz
%%             Copyright (C) 1995 1996 1997 1998 1999 David Carlisle
%%             Copyright (C) 2005-2013 Jin-Hwan Cho, Shunsaku Hirata
%%
%% This file is not part of the Standard LaTeX `Graphics Bundle' but still
%% may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
\ProvidesFile{dvipdfmx.def}
        [2013/09/21 v3.3 LaTeX graphics driver for dvipdfmx (TeX Live/ChoF)]
\def\c@lor@arg#1{%
  \dimen@#1\p@
  \ifdim\dimen@<\z@\dimen@\maxdimen\fi
  \ifdim\dimen@>\p@
    \PackageError{color}{Argument `#1' not in range [0,1]}\@ehd
  \fi}
\def\color@gray#1#2{%
  \c@lor@arg{#2}%
  \edef#1{[#2]}%
  }
\def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
\def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
  \c@lor@arg{#4}%
  \c@lor@arg{#1}%
  \c@lor@arg{#2}%
  \c@lor@arg{#3}%
  \edef#5{[#1 #2 #3 #4]}%
  }
\def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
\def\c@lor@@rgb#1,#2,#3\@@#4{%
  \c@lor@arg{#1}%
  \c@lor@arg{#2}%
  \c@lor@arg{#3}%
  \edef#4{[#1 #2 #3]}%
  }
\def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
\def\c@lor@@RGB#1,#2,#3\@@#4{%
 \c@lor@RGB@rgb{#1}\@tempa
 \c@lor@RGB@rgb{#2}\@tempb
 \c@lor@RGB@rgb{#3}\@tempc
 \c@lor@@rgb\@tempa,\@tempb,\@tempc\@@#4%
  }
\def\c@lor@RGB@rgb#1#2{%
  \dimen@#1\p@
  \divide\dimen@\@cclv
  \edef#2{\strip@pt\dimen@}}
\def\color@hsb#1#2{\c@lor@@hsb#2\@@#1}
\def\c@lor@@hsb#1,#2,#3\@@#4{%
  \c@lor@arg{#1}%
  \c@lor@arg{#2}%
  \c@lor@arg{#3}%
  \edef#4{[#1 #2 #3] hsb}%
  }
\def\color@named#1#2{\c@lor@@named#2,,\@@#1}
\def\c@lor@@named#1,#2,#3\@@#4{%
  \@ifundefined{col@#1}%
    {\PackageError{color}{Undefined color `#1'}\@ehd}%
  {\edef#4{ #1}}%
  }
\def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}
\def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}
\def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}
\def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}
\def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}
\def\c@lor@ps@gray#1\@@{#1 setgray}
\def\current@color{[0]}
\def\set@color{%
            \special{pdf:bcolor \current@color
                          }\aftergroup\reset@color}
\def\reset@color{\special{%
         pdf:ecolor}}
\def\set@page@color{\special{%
         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
  \def\@tempa{!}%
  \dimen@\Gin@urx\p@
  \advance\dimen@ -\Gin@llx\p@
  \Gin@defaultbp\Gin@urx\dimen@
  \dimen@\Gin@ury\p@
  \advance\dimen@ -\Gin@lly\p@
  \Gin@defaultbp\Gin@ury\dimen@
  \dimen@\Gin@req@width
  \dimen@ii.1bp%
  \divide\dimen@\dimen@ii
  \@tempdima\Gin@req@height
  \divide\@tempdima\dimen@ii
    \special{PSfile="#1"\space
      urx=\Gin@urx\space
      ury=\Gin@ury\space
      \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
      \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
      \ifGin@clip clip\fi}%
  \egroup}
\def\Grot@start{%
\special{pdf:btrans rotate \Grot@angle}}
\def\Grot@end{\special{pdf:etrans}}
\def\Gscale@start{%
\special{pdf:btrans xscale \Gscale@x\space yscale \Gscale@y}}
\def\Gscale@end{\special{pdf:etrans}}
\def\Gin@PS@raw#1{\special{ps: #1}}
\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}}}
\def\Gin@extensions{%
  .pdf,.ai,.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@.ai}#1{{pdf}{.ai}{#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}{.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
%%
%% End of file `dvipdfmx.def'.
