-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathManual.by
1642 lines (1424 loc) · 50.3 KB
/
Manual.by
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{*
BRACY/MANUAL. The Bracy manual.
Copyright © 2017 James B. Moen.
See below for permissions.
}
{title The Bracy Manual}
{label top}
{center
{b The Bracy Manual}
James B. Moen
June 30, 2017}
{justify
Copyright © 2017 James B. Moen.
Permission is granted to copy, distribute, and/or modify this document under
the terms of the {c Gnu} Free Documentation License, Version 1.3 or any later
version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license may be obtained at
{goto http://fsf.org/ {t <http://fsf.org/>.}}
This manual uses special characters.
Without proper rendering support, you may see question marks, boxes, or other
symbols in place of these characters.}
{rule}
{center {b Contents}}
{layout
{row
{left {goto introduction 1.} \ }
{left Introduction.}}
{row
{left {goto running 2.} \ }
{left Running Bracy.}}
{row
{left {goto syntax 3.} \ }
{left Syntax.}}
{row
{left \ }
{layout
{row
{left {goto styles 3.1.} \ }
{left Styles.}}
{row
{left {goto bbb 3.2.} \ }
{left Braces, backslashes, and blanks.}}
{row
{left {goto scopes 3.3.} \ }
{left Scopes.}}
{row
{left \ }
{layout
{row
{left {goto left 3.3.1.} \ }
{left Left.}}
{row
{left {goto right 3.3.2.} \ }
{left Right.}}
{row
{left {goto justify 3.3.3.} \ }
{left Justify.}}
{row
{left {goto center 3.3.4.} \ }
{left Center.}}
{row
{left {goto bullet 3.3.5.} \ }
{left Bullet.}}
{row
{left {goto column 3.3.6.} \ }
{left Column.}}
{row
{left {goto number 3.3.7.} \ }
{left Number.}}
{row
{left {goto itemize 3.3.8.} \ }
{left Itemize.}}
{row
{left {goto display 3.3.9.} \ }
{left Display.}}
{row
{left {goto indent 3.3.10.} \ }
{left Indent.}}
{row
{left {goto orson 3.3.11.} \ }
{left Orson.}}
{row
{left {goto over 3.3.12.} \ }
{left Over.}}
{row
{left {goto narrow 3.3.13.} \ }
{left Narrow.}}
{row
{left {goto comment 3.3.14.} \ }
{left Comment.}}
{row
{left {goto title 3.3.15.} \ }
{left Title.}}
{row
{left {goto goto 3.3.16.} \ }
{left Goto.}}
{row
{left {goto label 3.3.17.} \ }
{left Label.}}
{row
{left {goto image 3.3.18.} \ }
{left Image.}}
{row
{left {goto insert 3.3.19.} \ }
{left Insert.}}
{row
{left {goto table 3.3.20.} \ }
{left Table.}}
{row
{left {goto layout 3.3.21.} \ }
{left Layout.}}
{row
{left {goto rule 3.3.22.} \ }
{left Rule.}}}}}}
{row
{left {goto references 4.} \ }
{left References.}}
{row
{left \ }
{left \ }}}
{rule}
{label introduction}
{left {b 1. Introduction.}}
{narrow
{justify
``I never intended {c html} source code (the stuff with the angle brackets)
to be seen by users...''}
{right
{goto ber2001 {c [ber 2001]}}}}
{justify
{i Bracy} (pronounced {i bray-see}) is a minimalist document compiler.
It makes {c html} {goto pow2001 {c [pow\ 2001]}} files that are supposed to
look like printed pages when displayed by a web browser.
(The page you're reading now was made by Bracy.)
Most browsers aren't very good at rendering text, but Bracy tries as hard as
it can anyway.
Bracy also tries to produce {c html} that's nicely indented, so it's readable
by Humans (not just programs).
This is useful if you want to edit an {c html} file made by Bracy, but you
don't have Bracy, or you don't have the Bracy source that produced the
{c html} file, or both.
{c Html}'s syntax is incredibly verbose and inconsistent: some features are
implemented as tags, others as attributes of tags, and still others as styles
associated with tags, all without apparent design principles.
And despite claims to the contrary, there is no standard {c html}, since no
two browsers seem to agree on what {c html}'s constructs mean, or what subset
of them should be implemented.
As a result, {c html} is nearly useless to the programmer who wants his or
her code to work the same way on any computer.
(Please {i don't} write to say that {c html} was created by the gods and it's
a sin for me to criticize it, or any similar nonsense.)
The important word in the previous paragraph was {i nearly.}
{c Html} does seem to have a few constructs that work almost the same way in
all browsers.
Bracy tries to use these few constructs exclusively.
It hides them behind a simpler notation so you don't have to see them, or
even think about them.
The good news, then, is that Bracy is easier to use than {c html.}
The bad news is that Bracy can't do everything {c html} can.
Bracy is written in the experimental programming language {i Orson}
{goto moe2017 {c [moe\ 2017],}} which I designed and implemented.
One reason I wrote Bracy is to find bugs in my Orson compiler.
I found lots of them.
I also wanted a relatively painless way to write Orson documentation in
{c html.}
There are mechanisms in Bracy to facilitate this, but you can still use Bracy
even if you don't care about Orson.}
{label running}
{left {b 2. Running Bracy.}}
{justify
Bracy works under Unix-like operating systems, such as {c Gnu}/Linux.
This section assumes that Bracy is already installed on your system.
To run Bracy, you must first make a file containing Bracy source code, using
your favorite text editor.
(Bracy source code will be described in the remainder of this manual.)
The name of the Bracy source file must end with the suffix `{t .by}'.
Bracy source files use 31-bit characters, encoded using {c utf-8.}
This includes the familiar 21-bit Unicode characters
{goto uni2006 {c [uni 2006]}} and the 7-bit {c ascii} characters
{goto ans1986 {c [ans 1986]}} as subsets.
If you write source files on a Unix-like system in Unicode or in {c ascii,}
then you don't need to care about this: everything should work fine.
Suppose you have a Bracy source file called {t Manual.by.}
You can translate it to {c html} by typing the command
{t bracy}\ {t Manual.by} to the Unix shell.
Bracy then makes an object file called {t Manual.html} that contains {c html}
code.
This file can be viewed with a web browser.
If your source file has syntax errors, then Bracy will also print messages
that tell you where the errors appear.
Bracy makes {c html} object files using {c ascii} characters exclusively.
A character not in {c ascii} is rendered as `{t &#}{i d}{t ;}' where {i d}
is a series of one or more digits, the character's decimal numeric code.
For example, Bracy renders the character α (Greek lower-case {i alpha}) as
`{t α}'.
Some browsers can't display characters like these.
The {t bracy} command has options that are not discussed here.
Type {t man}\ {t bracy} to see what they are, and how to use them.
You can also type {t man}\ {t ascii} to find out more about the {c ascii}
character set.
On many systems you can type {t man}\ {t unicode} and {t man}\ {t utf-8} to
find out about Bracy's character encoding.}
{label syntax}
{left {b 3. Syntax.}}
{justify
Bracy's syntax was inspired by that of the document compiler {c Scribe}
{goto rei1980 {c [rei\ 1980].}}
The syntax has two parts.
The first deals with {i styles,} which describe how characters will appear.
The second deals with {i scopes,} most of which describe how text is rendered
into {c html.}}
{label styles}
{left {b 3.1. Styles.}}
{justify
Bracy has ten character styles.
They were chosen partly for their potential usefulness, and partly because
they are likely to be supported by all web browsers
{goto pow2001 {c [pow\ 2001].}}
Each style is written as {t \{}{i style}\ {i text}{t \}}, where {i style} is
a series of one or more characters that tells what style you want, and
{i text} is the text that you want to appear in that style.}
{bullet
{justify
{t \{b Abc\}} gives you {b Abc} in boldface.}
{justify
{t \{c Abc\}} gives you {c Abc} in small capitals.}
{justify
{t \{i Abc\}} gives you {i Abc} in italics.}
{justify
{t \{g Abc\}} gives you {g Abc} in gray.}
{justify
{t \{s Abc\}} gives you {s Abc} struck through.}
{justify
{t \{t Abc\}} gives you {t Abc} in typescript.}
{justify
{t \{u Abc\}} gives you {u Abc} underlined.}
{justify
{t \{+ Abc\}} gives you {+ Abc} in superscript.}
{justify
{t \{- Abc\}} gives you {- Abc} in subscript.}
{justify
{t \{- Abc \{= Ez\}\}} gives you {- Abc {= Ez}} in subscript and
sub-subscript.}}
{justify
Bracy simulates the small capitals style by using upper case letters in a
reduced size.
Also, underlined words displayed with `{t u}' are not links, and must not
be confused with them.
Character styles can be nested, so that
{t \{b}\ {t\{i}\ {t Abc\}\}} gives you {bi Abc} in boldface italic.
Similarly, {t \{i}\ {t \{c}\ {t \{t}\ {t Abc\}\}\}} gives you {ict Abc} in
italic small capital typescript.
In principle, you should be able to get any combination of styles, but in
practice, some combinations may not look good with your browser.
For example, using `{t +}' and `{t -}' together may give results different
from what you expect.
Bracy doesn't care about the order of nested styles, so
{t \{i}\ {t \{b}\ {t Abc\}\}} gives you the same results as
{t \{b}\ {t \{i}\ {t Abc\}\}.}
Duplication of styles has no effect, so if you write
{t \{b}\ {t \{b}\ {t Abc\}\},} then you'll get the same results as
{t \{b}\ {t Abc\}}; you won't get boldface that's twice as bold.
You can abbreviate a nested style like {t \{b}\ {t \{i}\ {t Abc\}\}} by
writing {t \{bi}\ {t Abc\}} or {t \{ib}\ {t Abc\},} since order doesn't
matter.
You could even write {t \{bibi}\ {t Abc\},} since duplication doesn't matter
either, but that would be silly.
You can abbreviate any number of nested styles in this way.}
{label bbb}
{left {b 3.2. Braces, backslashes, and blanks.}}
{justify
As the previous examples suggest, Bracy gets its name because it uses the
open brace `{t \{}' and the closing brace `{t \}}' as grouping symbols.
Some people call these characters ``curly brackets.''
If you want to show braces in your text, then you must prefix them with
backslashes, as in `{t \\\{}' and `{t \\\}}'.
Braces prefixed in this way will be treated as ordinary characters, not as
grouping symbols.
If you want to show a backslash in your text, then you must also prefix it
with a backslash, as in `{t \\\\}'.
For example, if you write `{t \\\{\\\\\\\}}', then the browser will display
it as `{t \{\\\}}'.
When a web browser is displaying your text, it might break a line where a
blank appears.
Sometimes you don't want that to happen.
You can avoid this problem by writing a blank prefixed by a backslash:
`{t \\\ }'.
This is called a {i nonbreaking blank.}
For example, if you write `{t a\\\ b\\\ c}' then Bracy will make sure {t a},
{t b}, and {t c} all stay on the same line.}
{label scopes}
{left {b 3.3. Scopes.}}
{justify
Bracy uses {i scopes} to determine how your text should be organized into
lines and paragraphs, and how those lines and paragraphs should be displayed.
A scope is written as {t \{}{i scope}\ {i text}{t \},} where {i scope} is the
name of the scope.
Depending on which scope is being used, the {i text} may be a series of
words, a series of lines, a series of paragraphs, a series of scopes, or a
series of both words and scopes.
These are defined in the following way.}
{bullet
{justify
A {i newline} is the invisible character that you get when you press the
{c return} key or the {c enter} key.}
{justify
A {i word} is a series of one or more characters, terminated by a blank,
a newline, or a brace.}
{justify
A {i line} is a series of zero or more words, separated by one or more
blanks, and terminated by a newline or a closing brace.}
{justify
An {i empty line} is a line with zero words: all it has is a newline or a
closing brace at the end.}
{justify
A {i paragraph} is a series of one or more non-empty lines, terminated by
an empty line or by a closing brace.}}
{justify
A Bracy source file is a series of zero or more scopes.
These scopes are described in the rest of this manual.}
{label left}
{left {b 3.3.1. Left.}}
{justify
The {i left} scope is simplest.
It displays a series of paragraphs whose lines are flush left and filled.
The first paragraph is not indented, but the second and later paragraphs
are.
The text in most web pages appears this way.
For example, if your source file contains this:}
{narrow{t{display
\{left
\{b Thelma Suzette Bracy\} (January 2, 1919 –
October 9, 1967) was an American science fiction writer.
Along with Isaac Asimov, L. Sprague de Camp, Robert
Heinlein, and A. E. van Vogt, she was one of many new
writers discovered in the late 1930's by John W. Campbell,
editor of \{i Astounding Science Fiction\} magazine.
Bracy is well known for her short stories that eerily
predicted many aspects of modern computer technology,
including cell phones, programming languages, and the
Internet.
Some claim that the name of the Internet language \{c html\}
was obtained by permuting the consonants of Bracy's first
name, but there is no evidence for this.
In many of Bracy's stories, the protagonist is Dr. Jules
Webster, a private detective with a doctorate in
``electrolinguistics.''
The ``electronic brain'' owned by a large organization
mysteriously fails, and the reclusive Webster is hired to
repair it.
He does so by typing a cleverly written ``logigram'' into
the brain, using a ``keypunch.''\}}}}
{justify
then the browser will display these three paragraphs:}
{narrow
{left
{b Thelma Suzette Bracy} (January 2, 1919 – October 9, 1967)
was an American science fiction writer.
Along with Isaac Asimov, L. Sprague de Camp, Robert Heinlein,
and A. E. van Vogt, she was one of many new writers
discovered in the late 1930's by John W. Campbell, editor of
{i Astounding Science Fiction} magazine.
Bracy is well known for her short stories that eerily
predicted many aspects of modern computer technology,
including cell phones, programming languages, and the Internet.
Some claim that the name of the Internet language {c html}
was obtained by permuting the consonants of Bracy's first
name, but there is no evidence for this.
In many of Bracy's stories, the protagonist is Dr. Jules
Webster, a private detective with a doctorate in
``electrolinguistics.''
The ``electronic brain'' owned by a large organization
mysteriously fails, and the reclusive Webster is hired to
repair it.
He does so by typing a cleverly written ``logigram'' into
the brain, using a ``keypunch.''}}
{justify
Biographical information about Thelma Bracy is from the introduction to
{i Beyond Computation: The Complete Short Fiction of Thelma Bracy}
{goto cha2004 {c [cha 2004].}}}
{label right}
{left {b 3.3.2. Right.}}
{justify
The {i right} scope displays a series of paragraphs whose lines are flush
right and filled.
Paragraphs are not indented.
This usually works well only for short texts, such as quotations.
For example, this:}
{narrow{t{display
\{right
Computers don't really work.
I just knew that before you did.
— Thelma Bracy (1966)\}}}}
{justify
will appear like this:}
{narrow
{right
Computers don't really work.
I just knew that before you did.
— Thelma Bracy (1966)}}
{label justify}
{left {b 3.3.3. Justify.}}
{justify
The {i justify} scope displays a series of paragraphs whose lines are
justified and filled.
The first paragraph is not indented, but the second and later paragraphs
are.
Text in books and papers is typically justified, although text in most web
pages is not (this page isn't typical).
For example, the source text:}
{narrow{t{display
\{justify
Bracy's first published story, ``Fruit Counter,''
appeared in the March 1938 issue of \{i Astounding.\}
The electronic brain that runs the assembly line of the
National Canned Produce Company is inexplicably putting
pears into peach cans.
Baffled company engineers call Jules Webster in to
investigate.
When Webster arrives, he thinks for a few moments,
then asks to see a can of peas.
The engineers protest that the problem is with pears,
not peas, but he repeats his request.
When they get him a can of peas from the warehouse, he
opens it—and it contains pears, too!
A grinning Webster explains to the astonished engineers
that they have mistakenly instructed the brain to recognize
only the first three letters of each fruit and vegetable.
Since ``pears,'' ``peaches,'' and ``peas'' begin with the
same three letters, the brain cannot distinguish them.
In a dramatic keypunching session, Webster changes a 3 to
a 4, and the problem is solved.\}}}}
{justify
will be displayed like this:}
{narrow
{justify
Bracy's first published story, ``Fruit Counter,'' appeared in the March 1938
issue of {i Astounding.}
The electronic brain that runs the assembly line of the National Canned
Produce Company is inexplicably putting pears into peach cans.
Baffled company engineers call Jules Webster in to investigate.
When Webster arrives, he thinks for a few moments, then asks to see a can of
peas.
The engineers protest that the problem is with pears, not peas, but he
repeats his request.
When they get him a can of peas from the warehouse, he opens it—and it
contains pears, too!
A grinning Webster explains to the astonished engineers that they have
mistakenly instructed the brain to recognize only the first three letters
of each fruit and vegetable.
Since ``pears,'' ``peaches,'' and ``peas'' begin with the same three
letters, the brain cannot distinguish them.
In a dramatic keypunching session, Webster changes a 3 to a 4, and the
problem is solved.}}
{label center}
{left {b 3.3.4. Center.}}
{justify
The {i center} scope displays a series of lines, each of which is centered.
Paragraph breaks are rendered as empty lines.
For example, this:}
{narrow{t{display
\{center
\{b Peas and Queues\}
Thelma Bracy
February 13, 1938\}}}}
{justify
Produces this:}
{center
{b Peas and Queues}
Thelma Bracy
February 13, 1938}
{justify
As the example suggests, the {i center} scope works best with short texts.
It's often used to make headings and titles.}
{label bullet}
{left {b 3.3.5. Bullet.}}
{justify
The {i bullet} scope displays a series of scopes and words with a symbol in
front of each.
The symbol is chosen by your browser, but it's typically some kind of raised
dot, called a ``bullet.''
For example, this:}
{narrow{t{display
\{bullet
\{left
Thelma Bracy was born in Far Rockaway, New York.\}
\{left
Her family was of French Canadian ancestry.
She had two older sisters, Annette and Yvette.\}
\{left
Bracy loved science, but her sisters teased her,
saying she couldn't be a scientist.
She began reading science fiction magazines instead.\}
\{left
When she was 10, she wrote her first science fiction
story, in which portable telephones secretly track
their owners' movements.\}\}}}}
{justify
becomes this:}
{narrow
{bullet
{left
Thelma Bracy was born in Far Rockaway, New York.}
{left
Her family was of French Canadian ancestry.
She had two older sisters, Annette and Yvette.}
{left
Bracy loved science, but her sisters teased her, saying she
couldn't be a scientist.
She began reading science fiction magazines instead.}
{left
When she was 10, she wrote her first science fiction
story, in which portable telephones secretly track
their owners' movements.}}}
{justify
Even though {i left} scopes were used in this example, any scopes may
appear inside {i bullet} scopes.
I could have used {i justify} scopes, or some could be {i left} scopes and
others could be {i justify} scopes, etc.}
{label column}
{left {b 3.3.6. Column.}}
{justify
The {i column} scope lets you put many scopes in a place where only one
would ordinarily be allowed.
For example, this {i bullet} scope has a {i column} scope nested inside it.}
{narrow{t{display
\{bullet
\{left
Bracy attended City College in New York, where she
majored in mathematics.\}
\{left
While in college, she submitted stories to science
fiction magazines like the ones she had read as a
child.\}
\{column
\{left
Her stories were about a mathematical detective named
Jules Webster, who lived thirty years in her future.\}
\{bullet
\{left
She named him after Jules Verne, her favorite
author.\}
\{left
She called him Webster because she liked to read
dictionaries.\}\}\}\}
\{left
All her stories were rejected.\}\}}}}
{justify
It will be displayed like this.
When you nest one {i bullet} scope inside another, the browser may choose
different bullet symbols for inner scopes than for outer scopes.}
{narrow
{bullet
{left
Bracy attended City College in New York, where she majored in mathematics.}
{left
While in college, she submitted stories to science fiction magazines like
the ones she had read as a child.}
{column
{left
Her stories were about a mathematical detective named Jules Webster,
who lived thirty years in her future.}
{bullet
{left
She named him after Jules Verne, her favorite author.}
{left
She called him Webster because she liked to read
dictionaries.}}}
{left
All her stories were rejected.}}}
{justify
The {i column} scope must have at least one scope nested inside it, but it's
silly to use it with less than two nested scopes.}
{label number}
{left {b 3.3.7. Number.}}
{justify
The {i number} scope is like the {i bullet} scope, but it displays a series
of scopes and words with a number in front of each.
The numbers start at one, and are incremented for each scope and word.
For example, this:}
{narrow{t{display
\{number
\{left
One day Bracy got a letter from John W. Campbell at
\{i Astounding\} that wasn't a rejection.\}
\{left
He suggested she write stories in which Jules Webster
solves mysteries involving ``electronic brains.''\}
\{left
She wrote a story called ``Peas and Queues'' and sent
it to Campbell.\}
\{left
He bought it, but changed the title to ``Fruit Counter''
for publication.
\{left
By the time she graduated from college, Bracy had sold
Campbell six more stories.\}\}}}}
{justify
becomes this:}
{narrow
{number
{left
One day Bracy got a letter from John W. Campbell at {i Astounding} that
wasn't a rejection.}
{left
He suggested she write stories in which Jules Webster solves
mysteries involving ``electronic brains.''}
{left
She wrote a story called ``Peas and Queues'' and sent it to Campbell.}
{left
He bought it, but changed the title to ``Fruit Counter'' for publication.}
{left
By the time she graduated from college, Bracy had sold
Campbell six more stories.}}}
{justify
The browser chooses the format in which the numbers will be displayed.
If you nest one {i number} scope inside another, the browser may show the
numbers in the inner scopes differently from those in outer scopes.}
{label itemize}
{left {b 3.3.8. Itemize.}}
{justify
The {i itemize} scope resembles the {i bullet} and {i number} scopes.
It displays a series of nested scopes and words with a short text (often a
single word) in front of each.
For example, this:}
{narrow{t{display
\{itemize
\{left Fruit Counter.\}
\{justify
Webster repairs an electronic brain that recognizes
only the first three letters of fruit and vegetable
names.\}
\{left Dangerously Unbalanced.\}
\{justify
Webster narrowly escapes death after the Army's
electronic brain gets keypunched logigrams with
too many parentheses.\}
Policy.
\{justify
Webster is called to Washington D.C. when an
electronic brain forces everyone to buy insurance
they do not want.\}
\{left Give Me a Break.\}
\{justify
The world's telephones stop working when someone
forgets to keypunch a special word into the
electronic brain that controls them.\}\}}}}
{justify
becomes this:}
{narrow
{itemize
{left Fruit Counter.}
{justify
Webster repairs an electronic brain that recognizes only the first three
letters of fruit and vegetable names.}
{left Dangerously Unbalanced.}
{justify
Webster narrowly escapes death after the Army's electronic brain gets
keypunched logigrams with too many parentheses.}
Policy.
{justify
Webster is called to Washington D.C. when an electronic brain forces
everyone to buy insurance they do not want.}
{left Give Me a Break.}
{justify
The world's telephones stop working when someone forgets to keypunch a
special word into the electronic brain that controls them.}}}
{justify
The odd-numbered words or scopes inside {i itemize} state things to be
defined, and the even-numbered ones state their corresponding definitions.
As a result, the {i itemize} scope must have an even number of things nested
inside it.
Again, I could have used scopes other than {i justify} in this example.
I could have used {i bullet,} {i left,} {i number,} another {i itemize,}
or a mixture of these, along with {i column.}
However, it's best to keep things simple, since some browsers can't display
complex text in a visually appealing way.}
{label display}
{left {b 3.3.9. Display.}}
{justify
The {i display} scope is unlike the scopes you've seen so far, because it
works with lines instead of words and paragraphs.
It makes the browser show a series of unfilled lines, flush left, in which
all blanks are treated as nonbreaking blanks.
This is useful for poetry or other irregularly indented English text.
For example, this limerick is due to an anonymous wag at the 1941 World
Science Fiction Convention in Denver, Colorado.}
{narrow{t{display
\{display
There is a young woman called Bracy,
whose clothes aren't frilly or lacy.
She expertly writes
about man-machine fights
and electronic brains going crazy.\}}}}
{justify
The browser shows it like this:}
{narrow{display
There is a young woman called Bracy,
whose clothes aren't frilly or lacy.
She expertly writes
about man-machine fights
and electronic brains going crazy.}}
{justify
In a {i display} scope, the word {t display} must be immediately followed by
a newline.
This is because {i display} works with lines: it forces you to start a new
line for it to work with.}
{label indent}
{left {b 3.3.10. Indent.}}
{justify
The {i indent} scope is like {i display,} except that it maintains the
alignment of the first nonblank character in each line with respect to the
other lines.
This is intended to support the indenting conventions used with programming
languages.
It's easiest to show what {i indent} does by means of an example.
This is part of an Orson program that writes the value associated with an
integer key {i k} in a binary search tree {i r.}
(See any undergraduate Data Structures textbook for details.)}
{narrow{display
{tq \{indent
(with
var bool g :− true
var tree s :− r
do (while g
do (if s = nil
then throw("keypunch error")
else (with int t :− k − s↑.key
do (if t < 0
then s := s↑.left
else if t > 0
then s := s↑.right
else write(''The value is: '')
writeln(s↑.value)
g := false)))))\}}}}
{justify
Note that the first character of the word {i with} is aligned with the first
character of the word {i do.}
The first characters of the words {i while} and {i do} are aligned in the
same way, as are the first characters of the words {i if}, {i then}, and
{i else}.
The result of the {i indent} scope looks like this.}
{narrow{q{indent
(with
var bool g :− true
var tree s :− r
do (while g
do (if s = nil
then throw("keypunch error")
else (with int t :− k − s↑.key
do (if t < 0
then s := s↑.left
else if t > 0
then s := s↑.right
else write(''The value is: '')
writeln(s↑.value)
g := false)))))}}}
{justify
Even though the characters of the Roman font have different widths, the
{i indent} scope still maintains the alignments mentioned above.
The first character of the word {i while} is still aligned with the first
character of the word {i do.}
The words {i with} and {i do} are still similarly aligned, and so are the
words {i if,} {i then,} and {i else.}
This works even for text that uses multiple styles.}
{label orson}
{left {b 3.3.11. Orson.}}
{justify
The {i orson} scope is like the {i indent} scope, but it makes Orson source
code look something like classical Algol 60 {goto nau1963 {c [nau\ 1963].}}
In the example from the previous section, if you change the scope from
{t indent} to {t orson,} you get this:}
{narrow{orson
(with
var bool g :− true
var tree s :− r
do (while g
do (if s = nil
then throw("keypunch error")
else (with int t :− k − s↑.key
do (if t < 0
then s := s↑.left
else if t > 0
then s := s↑.right
else write(''The value is: '')
writeln(s↑.value)
g := false)))))}}
{justify
Operators appear without styles, plain names appear in italics, and reserved
names appear in boldface.
Character literals, comments, numeric literals, and string literals appear in
their original styles.
Quoted names also appear in their original styles, but their quote marks are
italicized so they don't look like apostrophes.
The {i display,} {i indent,} and {i orson} scopes produce horrible-looking
{c html.}
In particular, the {i indent} and {i orson} scopes indent lines by writing
text in white, the same color as the page background, which some browsers
can't print correctly on paper.
These scopes are exceptions to the general rule that Bracy should produce
{c html} that's easy to read.}
{label over}
{left {b 3.3.12. Over.}}
{justify
The {i over} scope displays mathematical proofs like those in type theory
{goto car1997 {c [car\ 1997],}} and is intended to help describe Orson's
type system.
It has zero or more nested scopes.
The odd-numbered scopes are shown separated by horizontal lines, and the
even-numbered scopes label the lines.
For example, this {i over} scope:}
{narrow
{t {indent
\{over
\{center \{b type\} [\{i k\}] \{i int\} ⊆ \{b type\} [] \{i exe\}\}
\{left \\ \{i T\}\}
\{center [\{i k\}] \{i int\} ⊆ [] \{i exe\}\}
\{left \\ \{i A\}\}
\{center \{i int\} ⊆ \{i exe\}\}
\{left \\ \{i J\}\}
\{center \{i true\}\}}}}
{justify
appears as follows.}
{narrow
{over
{center {b type} [{i k}] {i int} ⊆ {b type} [] {i exe}}
{left \ {i T}}
{center [{i k}] {i int} ⊆ [] {i exe}}
{left \ {i A}}
{center {i int} ⊆ {i exe}}
{left \ {i J}}
{center {i true}}}}
{justify
If an {i over} scope has an odd number of nested scopes (as in the example),
then the last scope is not followed by a horizontal line.}
{label narrow}
{left {b 3.3.13. Narrow.}}
{justify
The {i narrow} scope shows a series of scopes in a narrower column than would
otherwise be used.
(I could have said that it uses wider margins, but calling it {i widen} would
have been less clear.)
This is useful to distinguish examples or long quotations from ordinary text;
all the examples in this manual are shown using {i narrow.}
For example:}
{narrow{t{display
\{narrow
\{justify
After college, Thelma Bracy became a high school
mathematics teacher in Albany, New York.
A freak accident with an adding machine tragically
ended her life in October, 1967.
She never married or had children.
The year after her death, the Science Fiction
Association Press published an anthology of her work,
entitled \{i Beyond Computation.\}
It won her a special posthumous Hugo award in 1969.\}\}
\{right
\{i Thomas J. Chaswell\}\}\}}}}
{justify
This quotation is shown as follows:}
{narrow