summaryrefslogtreecommitdiff
path: root/dviware/dvi-augsburg/manual/graphic.tex
blob: 70f505c6ac9206bf54efaa5958a93a5f98c969a9 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
% This is `graphic.tex' as of April 01, 1990 (no joke!) by Gerhard Wilhelms
%
% Simply say `\input graphic' at the beginning of your file, and you may
% include graphics with `\includegraphic{<filename>}', where filename is
% the name of your Postscript graphics file (<filename>.ps) resp. the companion
% \TeX file (<filename>.tex). Usually the companion file will be created by
% the Atari ST program imgtotex, but you can set it up by your own. You only
% need to specify the actual width and height of the Postscript image using
% the \TeX variables grwd for width and grht for height.
%
\newdimen\grwd \newdimen\grht
\font\ninesl=cmsl9
%
% framing
%
\def\boxstuff#1#2#3{%
  \vbox{\hrule height#2          %
    \hbox{\vrule width#2         % #1=Abstand innen zum Rahmen
      \hskip#1                   %
      \vbox{\vskip#1{}           % #2=Rahmendicke
        #3                       %
      \vskip#1}                  % #3=eingerahmter Text o.„.
      \hskip#1                   %
    \vrule width#2}              % Dank an Norbert Schwarz
  \hrule height#2}               %
}
%
% Bilder und Žhnliches
%
\def\labeledpicture#1#2{%
  \midinsert            % #1=Bildinhalt
  \vbox{                %
  $$\vbox{              %
  #1                    % #2=Bildtitel
  }$$                   %
  \smallskip
  \centerline{\ninesl #2}
  }
  \endinsert
}

\def\includegraphic #1{%
 \input #1 % the companion \TeX\ file
 \setgraphic{#1}{\the\grwd}{\the\grht}%
 }
%
\def\setgraphic #1#2#3{%
 \hbox to #2{\vbox to #3{\vfil\special{graphic img #1.img}}\hfil}%
 }

\def\includeps #1{%
 \input #1 % the companion \TeX\ file
 \setpsgraphic{#1.ps}{\the\grwd}{\the\grht}%
 }
%
\def\setpsgraphic #1#2#3{%
 \hbox to #2{\vbox to #3{\vfil\special{ps #1}}\hfil}%
 }


\def\putpsgraphic #1#2#3{%
 \hbox to #2{\vbox to #3{\special{ps #1}\vfil}\hfil}%
 }

\def\psdraw #1{%
 \input #1 % the companion \TeX\ file
 \putpsgraphic{#1.pst}{\the\grwd}{\the\grht}%
 }

\def\rpsdraw #1{%
  \boxstuff{0pt}{0.5pt}{\psdraw{#1}}
 }