Debian Codegraph @

attic/S9Book

raw
1 @Database @FontDef { Fonts }
2
3 langdef English { english : . ? ! .) ?) !) ".\"" "?\"" "!\"" }
4
5 export @Pa @Br @Sp
6 @B @I @BI @A @T @Em @White @H
7 @S_o @S_p @S_s @S_c @S_r @S_y @S_x @S_z
8 @C_co @C_cp @C_cs @C_cc @C_cr @C_cl @C_cx
9 @BQ
10 @Dash @MDash @Times @Neq @Arrow @INF @Power @Hyper
11 @Pre @Code
12 @Li @LLi @Empty
13 @Th @Tr @Td @Ts @Tdn @Tsn
14 @Sub @Sup
15 @Big @Small
16 @Type
17 @Quote
18 @BBox @Box @SolidBox
19 @Indent @EI
20 @Leaders @Dots
21 @Chapter @Section @SubSection
22 @Header @HeaderText
23 @X
24 @Document
25 @Text
26 @FootNote
27 @NewPage
28 @PageOf @PageMark
29
30 def @BookSetup
31 named @BaseColor { 0 0 0 setrgbcolor }
32 named @Spacing { 1.15fx }
33 named @BaseLanguage { English }
34 named @BaseFont { Times Roman 10p }
35 named @HeadingFont { AvantGarde Bold 20p }
36 named @SubHeadingFont { AvantGarde Bold 14p }
37 named @DocumentWidth { 8i }
38 named @DocumentHeight { 11i }
39 named @InnerMargin { 1i }
40 named @OuterMargin { 1i }
41 named @TopMargin { 1i }
42 named @BottomMargin { 1i }
43 named @PageNoOffset { 0.2iu }
44 named @PageNoStyle { Alternating }
45 # named @PageNoStyle { Centered }
46 named @HideBBoxes { Yes }
47 named @TwoColumns { No }
48 named @ColumnWidth { 2.8i }
49 named @InitialPage { 1 }
50 named @InitialAlignment { odd }
51 named @SkipPageNos { 1 2 3 4 5 }
52 @Begin
53 macro @Pa { //1.5vx }
54
55 macro @Br { //1vx }
56
57 macro @Sp { //2vx }
58
59 def @S_o right x { { 0.37 0.00 0.00 setrgbcolor } @SetColor {x}}
60 def @S_p right x { { 0.40 0.40 0.40 setrgbcolor } @SetColor {x}}
61 def @S_s right x { { 0.00 0.00 0.00 setrgbcolor } @SetColor {x}}
62 def @S_c right x { { 0.00 0.25 0.50 setrgbcolor } @SetColor {x}}
63 def @S_r right x { { 0.25 0.00 0.50 setrgbcolor } @SetColor {x}}
64 def @S_y right x { { 0.25 0.00 0.50 setrgbcolor } @SetColor {x}}
65 def @S_x right x { { 0.50 0.25 0.00 setrgbcolor } @SetColor {x}}
66 def @S_z right x { { 0.50 0.25 0.00 setrgbcolor } @SetColor {x}}
67
68 def @C_co right x { { 0.25 0.00 0.00 setrgbcolor } @SetColor {x}}
69 def @C_cp right x { { 0.30 0.30 0.30 setrgbcolor } @SetColor {x}}
70 def @C_cs right x { { 0.00 0.00 0.00 setrgbcolor } @SetColor {x}}
71 def @C_cc right x { { 0.00 0.25 0.50 setrgbcolor } @SetColor {x}}
72 def @C_cr right x { { 0.25 0.00 0.50 setrgbcolor } @SetColor {x}}
73 def @C_cl right x { { 0.25 0.00 0.50 setrgbcolor } @SetColor {x}}
74 def @C_cx right x { { 0.50 0.25 0.00 setrgbcolor } @SetColor {x}}
75
76 def @B right x { Bold @Font x }
77
78 def @I right x { Italic @Font x }
79
80 def @A right x { { AvantGarde Roman } @Font x }
81
82 def @T right x { { Courier Roman } @Font x }
83
84 def @H right x { { 0.5 setgray } @SetColor x }
85
86 def @BI right x { BoldItalic @Font x }
87
88 macro @BQ {+0.6w @VShift { {Bold -6p} @Font {&0.5su "\\" &0.5su}}}
89
90 def @Dash {- |0.2fo -}
91
92 macro @MDash {&0su {- |0.2fo - |0.2fo - |0.2fo -} &0su}
93
94 def @Times
95 left x
96 right y
97 {
98 x |0.5s { +0.2w @VShift {-2p AvantGarde Roman} @Font "x" } |0.5s y
99 }
100 def @Neq {" /" |0fo "=" |0.2fo "="}
101
102 def @Arrow { @Dash |0.3fo > }
103
104 def @INF { @Null | +0.3w @VShift { o |0.4fo o } }
105
106 def @Power { "^" |0.14fo "|" }
107
108 def @Hyper { @Power @Power }
109
110 def @Em
111 right x
112 {
113 @I x
114 }
115
116 def @Type
117 right x
118 {
119 { Courier Roman 12p } @Font x
120 }
121
122 def @Quote
123 right x
124 {
125 { lines } @Break x
126 }
127
128 def @Big
129 right x
130 {
131 { +2p } @Font x
132 }
133
134 def @Small
135 right x
136 {
137 { -2p } @Font x
138 }
139
140 def @White
141 right x
142 {
143 { 1.0 setgray } @SetColor x
144 }
145
146 def @Sub
147 left x
148 right y
149 {
150 x | -0.6w @VShift { -2p @Font y }
151 }
152
153 def @Sup
154 left x
155 right y
156 {
157 x | +0.6w @VShift { -2p @Font y }
158 }
159
160 def @Leaders {
161 ". " @Leaders
162 }
163
164 def @Dots
165 left width
166 {
167 def @pdots { "." @pdots }
168 width @Wide @pdots
169 }
170
171 def @Code
172 right x
173 {
174 @Null
175 //1.5vx
176 {
177 0 100 moveto
178 xsize 100 lineto
179 0 100 moveto
180 0 -100 rlineto
181 xsize 100 moveto
182 0 -100 rlineto
183 stroke
184 } @Graphic {}
185 //
186 { Courier Roman 10p } @Font { lines 1.2fx } @Break x
187 //
188 {
189 0 -100 moveto
190 xsize -100 lineto
191 0 -100 moveto
192 0 100 rlineto
193 xsize -100 moveto
194 0 100 rlineto
195 stroke
196 } @Graphic {}
197 }
198
199 def @Pre
200 right x
201 {
202 @Null
203 //1.5vx
204 { Courier Roman } @Font { lines 1.2fx } @Break x
205 }
206
207 def @Td
208 right x
209 {
210 x
211 }
212
213 def @Tdn
214 right x
215 {
216 rragged @Break x
217 }
218
219 def @Th
220 right x
221 {
222 @B x
223 }
224
225 def @Tr
226 right x
227 {
228 x
229 }
230
231 def @Li
232 left x
233 right y
234 {
235 { x |0.2c adjust @Break y }
236 }
237
238 def @Empty
239 right x
240 {
241 { @White (0) } @Li x
242 }
243
244 def @LLi
245 left x
246 right y
247 {
248 @Empty { x @Li y }
249 }
250 def @Chapter
251 right x
252 {
253 @Sp // @HeadingFont @Font x //
254 }
255
256 def @Section
257 right x
258 {
259 @Pa // @SubHeadingFont @Font x //
260 }
261
262 def @SubSection
263 right x
264 {
265 @Section x
266 }
267
268 def @TextLocation { @Galley }
269
270 def @EndIndentLocation { @Galley }
271
272 def @EI force into { @EndIndentLocation&&preceding }
273 {}
274
275 def @Indent
276 named offset { 0.4c }
277 right text
278 {
279 def @IndentLocation { @Galley }
280
281 def @LineList
282 {
283 offset @Wide {} | @PAdjust @IndentLocation
284 //1vx
285 @LineList
286 }
287
288 def @DoIndent force horizontally into { @IndentLocation&&preceding }
289 right x
290 {
291 x
292 }
293
294 offset @Wide {} | @PAdjust @IndentLocation
295 //
296 @DoIndent { text &1rt }
297 //1vx
298 @LineList
299 //
300 @EndIndentLocation
301 }
302
303 def @BBox
304 named @color { 1.0 1.0 1.0 setrgbcolor }
305 right x
306 {
307 @HideBBoxes @Case {
308 { Yes } @Yield { x }
309 else @Yield { {
310 0 0 moveto
311 xsize 0 lineto
312 xsize ysize lineto
313 0 ysize lineto
314 0 0 lineto
315 closepath
316 @color
317 stroke
318 } @Graphic x }
319 }
320 }
321
322 def @Box
323 named @color { 1.0 1.0 1.0 setrgbcolor }
324 named @width { 1 setlinewidth }
325 right x
326 {
327 {
328 gsave
329 0 0 moveto
330 xsize 0 lineto
331 xsize ysize lineto
332 0 ysize lineto
333 0 0 lineto
334 closepath
335 @color
336 @width
337 stroke
338 grestore
339 } @Graphic x
340 }
341
342 def @SolidBox
343 named @color { 1.0 1.0 1.0 setrgbcolor }
344 right x
345 {
346 {
347 0 0 moveto
348 xsize 0 lineto
349 xsize ysize lineto
350 0 ysize lineto
351 0 0 lineto
352 closepath
353 @color
354 fill
355 } @Graphic x
356 }
357
358 def @Ts
359 right x
360 {
361 @SolidBox @color { 0.8 setgray } x
362 }
363
364 def @Tsn
365 right x
366 {
367 rragged @Break @SolidBox @color { 0.8 setgray } x
368 }
369
370 def @Text force into { @TextLocation&&preceding }
371 right x
372 {
373 x
374 }
375
376 def @FootNoteLocation { @Galley }
377
378 def @FootNoteText into { @FootNoteLocation&&following }
379 left id
380 right x
381 {
382 { -2p @Font { @T{id} |0.2c { 1.2fx } @Break { x } } }
383 }
384
385 def @FootNote
386 left id
387 right x
388 {
389 @Sup @T{id}
390 id @FootNoteText x
391 }
392
393 def @FootNoteList {
394 //0.1i
395 @FootNoteLocation
396 //
397 @FootNoteList
398 }
399
400 def @EndPageLocation { @Galley }
401
402 def @BeginPage force into { @EndPageLocation&&following }
403 {}
404
405 macro @NewPage {
406 @VExpand @Null
407 //
408 @BeginPage
409 //
410 }
411
412 export @Tag
413 def @PageMarker right @Tag { @Null }
414
415 def @PageMark right x
416 {
417 @PageMarker&&preceding @Tagged x
418 }
419
420 def @PageOf right x {
421 @PageMarker&&x @Open {@Tag}
422 }
423
424 def @OddPage
425 right text
426 {
427 @DocumentWidth @Wide
428 @DocumentHeight @High
429 @BaseFont @Font
430 @BaseColor @SetColor
431 @BaseLanguage @Language
432 {
433 @Spacing
434 adjust
435 hyphen
436 } @Break {
437 //@TopMargin
438 ||@InnerMargin
439 @VExpand text
440 ||@OuterMargin
441 //@BottomMargin
442 }
443 }
444
445 def @EvenPage
446 right text
447 {
448 @DocumentWidth @Wide
449 @DocumentHeight @High
450 @BaseFont @Font
451 @BaseColor @SetColor
452 @BaseLanguage @Language
453 {
454 @Spacing
455 adjust
456 hyphen
457 } @Break {
458 //@TopMargin
459 ||@OuterMargin
460 @VExpand text
461 ||@InnerMargin
462 //@BottomMargin
463 }
464 }
465
466 def @PageNoType
467 left type
468 right pageno
469 {
470 @PageNoStyle @Case {
471 Centered @Yield { //@PageNoOffset ||0.5rt pageno }
472 else @Yield {
473 type @Case {
474 { odd } @Yield { //@PageNoOffset ||1rt pageno }
475 { even } @Yield { //@PageNoOffset pageno }
476 }
477 }
478 }
479 }
480
481 def @PageNo
482 left type
483 right pageno
484 {
485 pageno @Case {
486 @SkipPageNos @Yield @Null
487 else @Yield { type @PageNoType pageno }
488 }
489 }
490
491 def @PageList
492 left type
493 right pageno
494 {
495 @PageMarker pageno
496 type @Case {
497 { odd } @Yield {
498 @OddPage {
499 @TextLocation
500 //0.2i
501 @FootNoteList
502 //1rt
503 @EndPageLocation
504 //0.95rt
505 type @PageNo pageno }
506 }
507 { even } @Yield {
508 @EvenPage {
509 @TextLocation
510 //0.2i
511 @FootNoteList
512 //1rt
513 @EndPageLocation
514 //0.95rt
515 type @PageNo pageno }
516 }
517 }
518 @PageLabel pageno
519 //
520 type @Case {
521 { even } @Yield { odd @PageList @Next pageno }
522 { odd } @Yield { even @PageList @Next pageno }
523 }
524 }
525
526 def @X
527 right x
528 {
529 @PageMark{x}
530 @PageMark{---x---{@PageOf{x}}---}
531 }
532
533 def @HeaderLocation { @Galley }
534
535 def @HeaderText into { @HeaderLocation&&preceding }
536 right x
537 {
538 x
539 }
540
541 def @HeaderList {
542 @PageLabel Pre
543 @Null @OddPage @HeaderLocation
544 //1rt
545 @EndPageLocation
546 //
547 @HeaderList
548 }
549
550 def @Header {
551 @HeaderList
552 }
553
554 def @Document {
555 @InitialAlignment @PageList @InitialPage
556 }
557
558 @End @BookSetup