Debian Codegraph @

texmf-dist/tex/plain/graphics-pln/psfrag.tex

raw
1 % Plain TeX interface to psfrag.
2 % David Carlisle
3
4 % Note this needs etex not tex
5 % as etex extensions are used to control expansion
6
7 \input miniltx
8
9 \makeatletter
10
11 \ifx\@compatibilitytrue\@undefined
12 \csname newif\expandafter\endcsname
13 \csname if@compatibility\endcsname
14 \fi
15
16
17 \ifx\raisebox\@undefined
18 \def\raisebox#1#2{{%
19 \setbox0=\hbox{#2}\def\depth{\dp0}\leavevmode\raise#1\box\z@}}
20 \fi
21
22 \ifx\@@underline\@undefined
23 \let\@@underline\underline
24 \def\underline{%
25 \ifmmode\expandafter\@@underline\else\expandafter\underbar\fi}
26 \fi
27
28 \ifx\sbox\@undefined
29 \def\sbox#1{\setbox#1\hbox}
30 \fi
31
32
33 % psfrag loads the core graphics package, but only the extended
34 % graphicx interface is available from plain TeX so just intercept
35 % the call and ask for graphicx.
36 \let\savedRP\RequirePackage
37 \def\RequirePackage#1{%
38 \let\RequirePackage\savedRP
39 \ifx\includegraphics\@undefined
40 \input graphicx\fi\relax}
41 \input psfrag.sty
42
43
44
45 \ifx\pfg@dp\@undefined
46 \csname newdimen\endcsname\pfg@dp
47 \csname newdimen\endcsname\pfg@wd
48 \csname newdimen\endcsname\pfg@dx
49 \csname newdimen\endcsname\pfg@dy
50 \fi
51
52 \resetatcatcode