summaryrefslogtreecommitdiff
path: root/dviware/dvitops/pspict.sty
blob: 8088d5599dd9357c59332e1750b532dff416818d (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
% $Header: /usr/jjc/dvitops/RCS/pspict.sty,v 1.2 90/08/14 13:02:13 jjc Rel $
% modify the picture environment to use PostScript
% for LaTeX 2.09

\def\@prolog{pspict.ps} % the file containing the PostScript definitions
\newcount\arg@one
\newcount\arg@two
\newcount\arg@three
\newcount\arg@four
\newcount\arg@five
\newcount\arg@six
\newdimen\arrow@length
\newdimen\arrow@height
\newdimen\arg@temp
\arrow@length 4pt
\arrow@height 4pt

\def\line(#1,#2)#3{%
  \special{dvitops: prolog \@prolog}%
  \arg@one=#1\relax
  \arg@two=#2\relax
  \arg@temp=#3\unitlength\relax
  \arg@three=\arg@temp\relax
  \arg@four=\@wholewidth\relax
  \special{dvitops: inline
    \the\arg@four\space\the\arg@one\space\the\arg@two\space\the\arg@three\space line}}

\def\vector(#1,#2)#3{%
  \special{dvitops: prolog \@prolog}%
  \arg@one=#1\relax
  \arg@two=#2\relax
  \arg@temp=#3\unitlength\relax
  \arg@three=\arg@temp\relax
  \arg@four=\@wholewidth\relax
  \arg@five=\arrow@length\relax
  \arg@six=\arrow@height\relax
  \special{dvitops: inline
    \the\arg@five\space\the\arg@six\space\the\arg@four\space\the\arg@one\space
    \the\arg@two\space\the\arg@three\space vector}}

\def\arrowhead(#1,#2)#3#4{%
  \special{dvitops: prolog \@prolog}%
  \arg@one=#1\relax
  \arg@two=#2\relax
  \arg@temp=#3\unitlength\relax
  \arg@three=\arg@temp\relax
  \arg@temp=#4\unitlength\relax
  \arg@four=\arg@temp\relax
  \arg@five=\@wholewidth\relax
  \special{dvitops: inline
    \the\arg@three\space\the\arg@four\space\the\arg@five\space
    \the\arg@one\space\the\arg@two\space arrowhead}}

\def\circle{\@ifstar{\@dot}{\@circle}}
\def\@circle#1{%
  \special{dvitops: prolog \@prolog}%
  \arg@temp=#1\unitlength\relax
  \arg@one=\arg@temp\relax
  \arg@four=\@wholewidth\relax
  \special{dvitops: inline \the\arg@four\space\the\arg@one\space circle}}

\def\@dot#1{%
  \special{dvitops: prolog \@prolog}%
  \arg@temp=#1\unitlength\relax
  \arg@one=\arg@temp\relax
  \special{dvitops: inline \the\arg@one\space dot}}

\def\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}}

\def\@oval(#1,#2)[#3]{%
  \special{dvitops: prolog \@prolog}%
  \arg@temp=#1\unitlength\relax
  \arg@one=\arg@temp\relax
  \arg@temp=#2\unitlength\relax
  \arg@two=\arg@temp\relax
  \arg@four=\@wholewidth\relax
  \special{dvitops: inline
    \the\arg@four\space\the\arg@one\space\the\arg@two\space (#3) oval}}

\def\ellipse(#1,#2){%
  \special{dvitops: prolog \@prolog}%
  \arg@temp=#1\unitlength\relax
  \arg@one=\arg@temp\relax
  \arg@temp=#2\unitlength\relax
  \arg@two=\arg@temp\relax
  \arg@three=\@wholewidth\relax
  \special{dvitops: inline
    \the\arg@three\space\the\arg@one\space\the\arg@two\space ellipse}}