-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathchezweb.mp
165 lines (129 loc) · 4.05 KB
/
chezweb.mp
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
beginfig(1);
defaultfont := "bchr8r";
defaultscale := 2;
numeric x,y;
numeric ss,sd,sz,sh;
x := 0.5in; y := 0.5in;
ss := 1in; sd := 2in; sz := 3in; sh := 0.5in;
draw (x,y)--(x+sd,y)--(x+sd,y+sz)--(x,y+sz)--cycle;
draw (x,y+ss)--(x+sd,y+ss);
draw (x,y+sd)--(x+sd,y+sd);
label("Runtime", (x+ss,y+sd+sh));
label("Named Chunks", (x+ss,y+ss+sh));
label("Top-level Code", (x+ss,y+sh));
endfig;
beginfig(2);
numeric x, y, bx, bs;
numeric s, ss, sss, ssss, sh;
s := 18pt; ss := s*2; sss := s*3; ssss := s*4;
sh := s/2; sq := s/3;
bx := 9pt; by := 9pt;
x := bx; y := by;
draw (x , y)--(x+ss,y)--(x+ss,y+s)--(x,y+s)--cycle;
x := x+ssss+ss;
draw (x,y)--(x+ss,y)--(x+ss,y+s)--(x,y+s)--cycle;
x := x+ssss+ss;
draw (x,y)--(x+ss,y)--(x+ss,y+s)--(x,y+s)--cycle;
x := bx+ss; y := by+sh;
drawarrow (x,y)--(x+ssss,y);
x := x+ssss+ss;
drawarrow (x,y)--(x+ssss,y);
x := bx+s;
label(btex {\tt WEB} etex, (x,y));
x := x+ss*3;
label(btex \TeX etex, (x,y));
x := x+ss*3;
label(btex {\rm PDF} etex, (x,y));
x := bx+ssss; y := y+sq;
label(btex Chez{\tt WEAVE} etex, (x,y));
x := x+ss*3;
label(btex Xe\TeX etex, (x,y));
endfig;
beginfig(3);
numeric x,y, q, s, v;
numeric l,ll,lll,llll;
s := 50pt; v := 0.3in; q := 6pt;
l := v*4; ll := v*3; lll := v*2; llll := v*1;
x := s*4.5; y := l;
label(btex Control Codes etex, (x,y));
y := y-q;
draw (x,y)--(s*1.5,ll);
draw (x,y)--(s*3,ll);
draw (x,y)--(s*4.5,ll);
draw (x,y)--(s*7.5,ll);
x := s*1.5; y := ll-q;
draw (x,y-q)--(x-s/2,lll);
draw (x,y-q)--(x+s/2,lll);
label(btex Data etex, (x,y)); x := s*3;
draw (x,y-q)--(x-s/2,lll);
draw (x,y-q)--(x,lll);
draw (x,y-q)--(x+s/2,lll);
label(btex Code etex, (x,y)); x := s*4.5;
draw (x,y-q)--(x-s/2,lll);
draw (x,y-q)--(x+s/2,lll);
label(btex Delimiter etex, (x,y)); x := s*7.5;
draw (x,y-q)--(x-s*2,lll);
draw (x,y-q)--(x-s,lll);
draw (x,y-q)--(x,lll);
draw (x,y-q)--(x+s,lll);
label(btex Annotation etex, (x,y));
x := s*1.5-s/2; y := lll-q;
label(btex {\tt @\ } etex, (x,y)); x := x+s;
label(btex {\tt @*} etex, (x,y));
x := s*3-s/2;
label(btex {\tt @p} etex, (x,y)); x := x+s/2;
label(btex {\tt @<} etex, (x,y)); x := x+s/2;
label(btex {\tt @(} etex, (x,y)); x := x+s/2;
x := s*4.5-s/2;
label(btex {\tt @>} etex, (x,y)); x := x+s;
label(btex {\tt @>=} etex, (x,y)); x := x+s;
x := s*7.5-s*2;
label(btex {\tt @c} etex, (x,y)); x := x+s;
label(btex {\tt @q} etex, (x,y)); x := x+s;
label(btex Index etex, (x,y)); x := x+s;
label(btex {\tt @i} etex, (x,y)); x := x+s;
x := s*7.5; y := y-q;
draw (x,y)--(x-s/2,llll);
draw (x,y)--(x,llll);
draw (x,y)--(x+s/2,llll);
x := s*7.5-s/2; y := llll-q;
label(btex {\tt @\^\ } etex, (x,y)); x := x+s/2;
label(btex {\tt @:} etex, (x,y)); x := x+s/2;
label(btex {\tt @.} etex, (x,y)); x := x+s/2;
endfig;
beginfig(4);
numeric x, y, bx, bs;
numeric s, ss, sss, ssss, sh;
s := 18pt; ss := s*2; sss := s*3; ssss := s*4;
sh := s/2; sq := s/3;
bx := 9pt; by := 9pt;
x := bx; y := by;
draw (x , y)--(x+ss,y)--(x+ss,y+s)--(x,y+s)--cycle;
x := x+ssss+ss;
draw (x,y)--(x+ss,y)--(x+ss,y+s)--(x,y+s)--cycle;
x := bx+ss; y := by+sh;
drawarrow (x,y)--(x+ssss,y);
x := bx+s;
label(btex {\tt WEB} etex, (x,y));
x := x+ss*3;
label(btex {\tt SCM} etex, (x,y));
x := bx+ssss; y := y+sq;
label(btex Chez{\tt TANGLE} etex, (x,y));
endfig;
beginfig(5);
path ob,rtb,rtlb,ssb,wvb,tngb;
ob := (0in,0in)--(0in,3in)--(6in,3in)--(6in,0in)--cycle;
rtb := (0.1in,0.1in)--(0.1in,2.5in)--(2.95in,2.5in)--(2.95in,0.1in)--cycle;
ssb := (3.05in,0.1in)--(3.05in,2.5in)--(5.9in,2.5in)--(5.9in,0.1in)--cycle;
rtlb := (0.2in,0.2in)--(0.2in,1in)--(2.85in,1in)--(2.85in,0.2in)--cycle;
tngb := (3.15in,0.2in)--(3.15in,1in)--(5.8in,1in)--(5.8in,0.2in)--cycle;
wvb := (3.15in,1.1in)--(3.15in,2in)--(5.8in,2in)--(5.8in,1.1in)--cycle;
draw ob; draw rtb; draw ssb; draw rtlb; draw tngb; draw wvb;
label("chezweb.w", (3in,2.75in));
label("runtime.ss", (1.5in,1.75in));
label("runtime.sls", (1.5in,0.60in));
label("chezweb.ss", (4.5in,2.24in));
label("cheztangle.ss", (4.5in,1.55in));
label("chezweave.ss", (4.5in,0.60in));
endfig;
end