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}

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

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}

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⟩

Index

Numbers written in italic refer to the page where the corresponding entry is described, the ones underlined to the code line of the definition, the rest to the code lines where the entry is used.

Symbols

\@ifnextchar . . . . . . 37
\@tempswafalse . . . . 13

\\ . . . . . . . . . . . . . . 42

B

\begingroup . . . . . . . 11

\bgroup . . . . . . . . . . 45

C

\CurrentOption . . . . . 2

D

\DeclareOption . . . . . 2

\def . . . . . . . . . . . 5, 7, 8, 21, 22, 25– 28, 30, 35, 36, 41, 44, 46, 76–79

\define@key . . . . . 21–24

E

\egroup . . . . . . . . . . 71 \else …. 17, 52, 58, 64 \endgroup . . . . . . . . 20

\epsf@bb@box . . . . 38, 41

\epsf@box … 39, 43, 44

\epsfbox,\epsffile . \underline{31}
\epsfclipoff . . . . . . 77
\epsfclipon . . . . . . . 76

\epsfsize . . . . . . 35, 47

\epsfverbosefalse . 79
\epsfverbosetrue . . 78

                          \epsfxsize . . 31, 34,

35, 47, 48, 59, 73

                          \epsfysize . . 32, 33,

49, 54, 61, 65, 72

                          \ErrorNoFile . . . . . . 17
                          \expandafter . . . . . . 42

F \fi . . . . . 19, 57, 67, 68

G

                          \Gfigname . . . . . . . .

. 12, 14, 17, 21, 22

                          \Gin@bboxfalse . . . . 39
                          \Gin@bboxtrue . . . . . 38
                          \Gin@clipfalse . . . . 77
                          \Gin@cliptrue . . . . . 76
                          \Gin@draftfalse . . . 26
                          \Gin@drafttrue . . . . 25
                          \Gin@eheight . . . . . . . 6
                          \Gin@esetsize . . . . . 16
                          \Gin@ewidth . . . . . . . . 6
                          \Gin@exclamation . .

. . . . . . 6, 8, 53, 62

                          \Gin@nat@height . 9,

47, 50, 55, 63, 66

                          \Gin@nat@width . . . .

. 10, 47, 51, 56, 60

                          \Gin@req@height 9, 50,

54, 55, 63, 65, 66

                          \Gin@req@sizes . . . 7, 46

                                                   \Gin@req@width . . . .

. 10, 51, 56, 59, 60

                                                   \Gin@scalex 8, 53, 60, 63
                                                   \Gin@scaley . . . . . . .

. . 8, 55, 56, 62, 66

                                                   \Ginclude@graphics .

. . . . . . . . . 14, 70

                                                   \Gread@parse@bb . . . 42
                                                   \Gscale@div . . 55, 60, 66

I \ifdim . . . . . . 48, 49, 61 \ifx . . . . . . . . . . . . . 17 \input . . . . . . . . . . . 30

L \let . . . . . . . . . . . 6,

8, 12, 29, 53, 62, 75

M

                                                   \makeatletter . . . . . 30
                                                   \makeatother . . . . . . 30

N \newdimen . . . . . . 31, 32

P

                                                   \PassOptionsToPackage

. . . . . . . . . . . . . 2

                                                   \ProcessOptions . . . . 3

\psdraft . . . . . . . . . 25

                                                   \psfig,\epsfig . . . . . \underline{5}
                                                   \psfigdriver . . . . . . 30

\psfull . . . . . . . . . . 26 \psnoisy . . . . . . . . . 28 \pssilent . . . . . . . . 27

R

\relax . . . . . . . . . 12, 17

                          \RequirePackage . . . . 4

S \setkeys . . . . . . . . . 15

T \the . . . . . . . . . . . . . 18 \toks@ . . . . . . . . . 14, 18 \typeout 23, 27, 28, 78, 79

Z \z@ . . . . . . . . 33, 34,

48, 49, 61, 72, 73