Debian Codegraph @

attic/S9Book-bw

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