The epsfig package^{∗}

Sebastian Rahtz spqr@ftp.tex.ac.uk

1996/10/04

1 Preface

1 ⟨∗package⟩

 2 \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
 3 \ProcessOptions
 4 \RequirePackage{graphicx}

1.1 Emulation of ‘psfig’ syntax

Emulate ”epsfig.sty”, and most varieties of psfig

\psfig,\epsfig
 5 \def\psfig#1{%
 6 \let\Gin@ewidth\Gin@exclamation\let\Gin@eheight\Gin@ewidth
 7 \def\Gin@req@sizes{%
 8 \def\Gin@scalex{1}\let\Gin@scaley\Gin@exclamation
 9 \Gin@req@height\Gin@nat@height
10 \Gin@req@width\Gin@nat@width}%
11 \begingroup
12  \let\Gfigname\relax
13  \@tempswafalse
14  \toks@{\Ginclude@graphics{\Gfigname}}%
15  \setkeys{Gin}{#1}%
16  \Gin@esetsize
17  \ifx\Gfigname\relax\ErrorNoFile\else
18  \the\toks@
19  \fi
20 \endgroup}
21 \define@key{Gin}{figure}{\def\Gfigname{#1}}
22 \define@key{Gin}{file}{\def\Gfigname{#1}}
23 \define@key{Gin}{prolog}{\typeout{epsfig: header files are not needed}}
24 \define@key{Gin}{silent}[]{}
25 \def\psdraft{\Gin@drafttrue}
26 \def\psfull{\Gin@draftfalse}
27 \def\pssilent{\typeout{epsfig option `silent' ignored}}
28 \def\psnoisy{\typeout{epsfig option `noisy' ignored}}
29 \let\epsfig\psfig
30 \def\psfigdriver#1{\makeatletter\input{#1.def}\makeatother}

∗This file has version number v1.7, last revised 1996/10/04.

1.2 Emulation of ‘epsf’ syntax

Emulate Rokicki’s ”epsf.tex” supplied with the ever-popular dvips.

\epsfbox,\epsffile
31 \newdimen\epsfxsize
32 \newdimen\epsfysize
33 \epsfysize\z@
34 \epsfxsize\z@
35 \def\epsfsize#1#2{\epsfxsize}
36 \def\epsfbox{%
37 \@ifnextchar[%
38 {\Gin@bboxtrue\epsf@bb@box}%
39 {\Gin@bboxfalse\epsf@box}%

40 }

41 \def\epsf@bb@box[#1#2]{%
42 \expandafter\Gread@parse@bb#1#2 \\
43 \epsf@box}
44 \def\epsf@box#1{%
45 \bgroup
46 \def\Gin@req@sizes{%
47  \epsfxsize\epsfsize{\Gin@nat@width}{\Gin@nat@height}%
48  \ifdim\epsfxsize=\z@
49  \ifdim\epsfysize=\z@
50  \Gin@req@height\Gin@nat@height
51  \Gin@req@width\Gin@nat@width
52  \else
53  \let\Gin@scalex\Gin@exclamation
54  \Gin@req@height\epsfysize
55  \Gscale@div\Gin@scaley\Gin@req@height\Gin@nat@height
56  \Gin@req@width\Gin@scaley\Gin@nat@width
57  \fi
58  \else
59  \Gin@req@width\epsfxsize
60  \Gscale@div\Gin@scalex\Gin@req@width\Gin@nat@width
61  \ifdim\epsfysize=\z@
62  \let\Gin@scaley\Gin@exclamation
63  \Gin@req@height\Gin@scalex\Gin@nat@height
64  \else
65  \Gin@req@height\epsfysize
66  \Gscale@div\Gin@scaley\Gin@req@height\Gin@nat@height
67  \fi
68  \fi
69  }%
70 \Ginclude@graphics{#1}%
71 \egroup
72 \epsfysize\z@
73 \epsfxsize\z@

74 }

75 \let\epsffile\epsfbox
76 \def\epsfclipon{\Gin@cliptrue}
77 \def\epsfclipoff{\Gin@clipfalse}
78 \def\epsfverbosetrue{\typeout{epsf verbose option ignored}}
79 \def\epsfverbosefalse{\typeout{epsf verbose option ignored}}

80 ⟨/package⟩