blob: 0ffe517cd1a334d1c9e3f84468428d36b686bb40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
%----------------------------------------------------------------------%
% Macros for GP -> TeX interface %
% version 2.10 Nov. 12 1993 by K.Edamatsu. %
%----------------------------------------------------------------------%
%
% Macros for plain TeX and LaTeX
%
\def\PictureOrigin{u}% Origin of a picture = upper (or lower)
\def\SpecialCommand{lipsfile=}%
%
%--- picture in \hbox
\def\PictureHbox#1{\def\PictureFile{#1}%
\input#1\hbox to\PictureWidth true mm
{\vbox to\PictureHeight true mm
\if\PictureOrigin u
{\special{\SpecialCommand\PictureFile}\vfil}%
\else
{\vfil\special{\SpecialCommand\PictureFile}}%
\fi\hfil}}
%
%--- picture in \mbox
\def\PictureBox#1{\leavevmode\PictureHbox{#1}}
%
%--- picture in \fbox
\def\PictureFrameBox#1{\leavevmode\hbox
{\vrule\vbox{\hrule\PictureHbox{#1}\hrule}\vrule}}
%
% Macros for LaTeX
%
\expandafter\ifx\csname LaTeX\endcsname\relax% { if \LaTeX is undefined }
\else% { else .... }
%
%--- picture in LaTex's `picture' environment
\newenvironment{PictureIn}[1]{%
\input#1\unitlength=1mm%
\begin{picture}(\PictureWidth,\PictureHeight)
\if\PictureOrigin u
\put(0,\PictureHeight){\special{\SpecialCommand\PictureFile}}
\else
\put(0,0){\special{\SpecialCommand\PictureFile}}
\fi}{%
\end{picture}}
%
%--- picture in \oval
\def\PictureOvalBox#1{%
\begin{PictureIn}{#1}
\put(\PictureCenterX,\PictureCenterY){\oval(\PictureWidth,\PictureHeight)}
\end{PictureIn}}
%
%--- picture in \dashbox
\def\PictureDashBox#1#2{%
\begin{PictureIn}{#2}
\put(0,0){\dashbox{#1}(\PictureWidth,\PictureHeight){}}
\end{PictureIn}}
%
\fi
%
\endinput
|