Update LuaTeX testfiles for ^@ change
[latex2e.git] / latex2e-20170101 / required / graphics / epsfig.dtx
blob15ab20c24d56860f82a14f8fab001f38cf798637
2 % \iffalse
4 %% epsfig.dtx Copyright (C) 1994-1996 1999 Sebastian Rahtz
5 %%            Copyright (C) 2000--2015 David Carlisle, LaTeX3 Project
6 %%
7 %% This file is part of the Standard LaTeX `Graphics Bundle'.
8 %% It may be distributed under the terms of the LaTeX Project Public
9 %% License, as described in lppl.txt in the base LaTeX distribution.
10 %% Either version 1.3 or, at your option, any later version.
12 %<*dtx>
13           \ProvidesFile{epsfig.dtx}
14 %</dtx>
15 %<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
16 %<package>\ProvidesPackage{epsfig}
17 %<driver> \ProvidesFile{epsfig.drv}
18 % \fi
19 %         \ProvidesFile{epsfig.dtx}
20                   [1999/02/16 v1.7a (e)psfig emulation (SPQR)]
22 % \iffalse
23 %<*driver>
24 \documentclass{ltxdoc}
25 \begin{document}
26  \DocInput{epsfig.dtx}
27 \end{document}
28 %</driver>
29 % \fi
31 % \GetFileInfo{epsfig.dtx}
33 % \title{The \textsf{epsfig} package\thanks{This file
34 %        has version number \fileversion, last
35 %        revised \filedate.}}
36 % \author{Sebastian Rahtz\\spqr@ftp.tex.ac.uk}
37 % \date{\filedate}
38 % \MaintainedByLaTeXTeam{graphics}
39 % \maketitle
42 % \StopEventually{}
44 % \section{Preface}
45 %    \begin{macrocode}
46 %<*package>
47 \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
48 \ProcessOptions
49 \RequirePackage{graphicx}
50 %    \end{macrocode}
51 % \subsection{Emulation of `psfig' syntax}
52 % Emulate "epsfig.sty", and most varieties of psfig
53 % \begin{macro}{\psfig,\epsfig}
54 %    \begin{macrocode}
55 \def\psfig#1{%
56  \let\Gin@ewidth\Gin@exclamation\let\Gin@eheight\Gin@ewidth
57  \def\Gin@req@sizes{%
58    \def\Gin@scalex{1}\let\Gin@scaley\Gin@exclamation
59    \Gin@req@height\Gin@nat@height
60    \Gin@req@width\Gin@nat@width}%
61    \begingroup
62     \let\Gfigname\relax
63     \@tempswafalse
64     \toks@{\Ginclude@graphics{\Gfigname}}%
65     \setkeys{Gin}{#1}%
66     \Gin@esetsize
67     \ifx\Gfigname\relax\ErrorNoFile\else
68       \the\toks@
69     \fi
70   \endgroup}
71 \define@key{Gin}{figure}{\def\Gfigname{#1}}
72 \define@key{Gin}{file}{\def\Gfigname{#1}}
73 \define@key{Gin}{prolog}{\typeout{epsfig: header files are not needed}}
74 \define@key{Gin}{silent}[]{}
75 \def\psdraft{\Gin@drafttrue}
76 \def\psfull{\Gin@draftfalse}
77 \def\pssilent{\typeout{epsfig option `silent' ignored}}
78 \def\psnoisy{\typeout{epsfig option `noisy' ignored}}
79 \let\epsfig\psfig
80 \def\psfigdriver#1{\makeatletter\input{#1.def}\makeatother}
81 %    \end{macrocode}
82 % \end{macro}
83 % \subsection{Emulation of `epsf' syntax}
84 % Emulate Rokicki's "epsf.tex" supplied with the ever-popular dvips.
85 % \begin{macro}{\epsfbox,\epsffile}
86 %    \begin{macrocode}
87 \newdimen\epsfxsize
88 \newdimen\epsfysize
89 \epsfysize\z@
90 \epsfxsize\z@
91 \def\epsfsize#1#2{\epsfxsize}
92 \def\epsfbox{%
93  \@ifnextchar[%
94   {\Gin@bboxtrue\epsf@bb@box}%
95   {\Gin@bboxfalse\epsf@box}%
97 \def\epsf@bb@box[#1#2]{%
98   \expandafter\Gread@parse@bb#1#2 \\
99   \epsf@box}
100 \def\epsf@box#1{%
101  \bgroup
102    \def\Gin@req@sizes{%
103         \epsfxsize\epsfsize{\Gin@nat@width}{\Gin@nat@height}%
104         \ifdim\epsfxsize=\z@
105             \ifdim\epsfysize=\z@
106                 \Gin@req@height\Gin@nat@height
107                 \Gin@req@width\Gin@nat@width
108             \else
109                 \let\Gin@scalex\Gin@exclamation
110                 \Gin@req@height\epsfysize
111                 \Gscale@div\Gin@scaley\Gin@req@height\Gin@nat@height
112                 \Gin@req@width\Gin@scaley\Gin@nat@width
113             \fi
114         \else
115             \Gin@req@width\epsfxsize
116             \Gscale@div\Gin@scalex\Gin@req@width\Gin@nat@width
117             \ifdim\epsfysize=\z@
118                 \let\Gin@scaley\Gin@exclamation
119                 \Gin@req@height\Gin@scalex\Gin@nat@height
120             \else
121                 \Gin@req@height\epsfysize
122                 \Gscale@div\Gin@scaley\Gin@req@height\Gin@nat@height
123             \fi
124         \fi
125       }%
126  \Ginclude@graphics{#1}%
127  \egroup
128  \epsfysize\z@
129  \epsfxsize\z@
131 \let\epsffile\epsfbox
132 \def\epsfclipon{\Gin@cliptrue}
133 \def\epsfclipoff{\Gin@clipfalse}
134 \def\epsfverbosetrue{\typeout{epsf verbose option ignored}}
135 \def\epsfverbosefalse{\typeout{epsf verbose option ignored}}
136 %</package>
137 %    \end{macrocode}
138 % \end{macro}
140 % \Finale