Bell 32V development
[unix-history] / usr / doc / eqn / e6
CommitLineData
755c0b0d
TL
1.NH
2Experience
3.PP
4There are really three aspects of interest_how
5well
6.UC EQN
7sets mathematics,
8how well it satisfies its goal
9of being ``easy to use,''
10and how easy it was to build.
11.PP
12The first question is easily addressed.
13This entire paper
14has been set by the program.
15Readers can judge for themselves
16whether it is good enough for their purposes.
17One of our users commented that although the output
18is not as good as the best hand-set material,
19it is still
20better than average,
21and much better than
22the worst.
23In any case, who cares?
24Printed books cannot compete with the birds and flowers
25of illuminated manuscripts on esthetic grounds,
26either,
27but they have some clear economic advantages.
28.PP
29Some of the deficiencies in the output could
30be cleaned up with more work on our part.
31For example, we sometimes leave too much space between
32a roman letter and an italic one.
33If we were willing to keep track of the fonts
34involved,
35we could do this better more of the time.
36.PP
37Some other weaknesses are inherent in our output device.
38It is hard, for instance, to draw a line
39of an arbitrary length without getting
40a perceptible overstrike at one end.
41.PP
42As to ease of use,
43at the time of writing,
44the system has been used by two distinct groups.
45One user population consists of mathematicians,
46chemists, physicists, and computer scientists.
47Their typical reaction has been something like:
48.IP " (1)"
49It's easy to write, although I make the following mistakes...
50.IP " (2)"
51How do I do...?
52.IP " (3)"
53It botches the following things.... Why don't you fix them?
54.IP " (4)"
55You really need the following features...
56.sp 5p
57.PP
58The learning time is short.
59A few minutes gives the general flavor,
60and typing a page or two of a paper generally
61uncovers most of the misconceptions about how it works.
62.PP
63The second user group is much larger,
64the secretaries and mathematical typists
65who were the original target of the system.
66They tend to be enthusiastic converts.
67They find the language easy to learn
68(most are largely self-taught),
69and have little trouble producing the output they want.
70They are of course less critical of the esthetics of their output
71than users trained in mathematics.
72After a transition period, most find
73using a computer more interesting than
74a regular typewriter.
75.PP
76The main difficulty that users have seems to be remembering
77that a blank is a delimiter;
78even experienced users use blanks where they shouldn't and omit them
79when they are needed.
80A common instance is typing
81.P1
82f(x sub i)
83.P2
84which produces
85.EQ
86f(x sub i)
87.EN
88instead of
89.EQ
90f(x sub i )
91.EN
92Since the
93.UC EQN
94language knows no mathematics, it cannot deduce that the
95right parenthesis is not part of the subscript.
96.PP
97The language is somewhat prolix, but this doesn't seem
98excessive considering how much is being done,
99and it is certainly more compact than the corresponding
100.UC TROFF
101commands.
102For example, here is the source for the continued fraction
103expression in Section 1 of this paper:
104.P1
105.ne 4
106.ce 0
107 a sub 0 + b sub 1 over
108 {a sub 1 + b sub 2 over
109 {a sub 2 + b sub 3 over
110 {a sub 3 + ... }}}
111.P2
112This is the input for the large integral of Section 1;
113notice the use of definitions:
114.P1
115.ce 0
116.ne 15
117.in 1
118define emx "{e sup mx}"
119define mab "{m sqrt ab}"
120define sa "{sqrt a}"
121define sb "{sqrt b}"
122int dx over {a emx - be sup -mx} ~=~
123left { lpile {
124 1 over {2 mab} ~log~
125 {sa emx - sb} over {sa emx + sb}
126 above
127 1 over mab ~ tanh sup -1 ( sa over sb emx )
128 above
129 -1 over mab ~ coth sup -1 ( sa over sb emx )
130}
131.in 0
132.P2
133.PP
134As to ease of construction,
135we have already
136mentioned that there are really only a few person-months
137invested.
138Much of this time has gone into two things_fine-tuning
139(what is the most esthetically pleasing space to use
140between the numerator and denominator of a fraction?),
141and changing things found deficient by our users
142(shouldn't a tilde be a delimiter?).
143.PP
144The program consists of a number of small,
145essentially unconnected modules for code generation,
146a simple lexical analyzer,
147a canned parser which we did not have to write,
148and some miscellany associated with input files
149and the macro facility.
150The program is now about 1600 lines of
151.UC C
152[6], a high-level language reminiscent of
153.UC BCPL .
154About 20 percent of these lines are ``print'' statements,
155generating the output code.
156.PP
157The semantic routines that generate the actual
158.UC TROFF
159commands can be changed to accommodate other formatting languages
160and devices.
161For example, in less than 24 hours,
162one of us changed the entire semantic package
163to drive
164.UC NROFF,
165a variant of
166.UC TROFF,
167for typesetting mathematics on teletypewriter devices
168capable of reverse line motions.
169Since many potential users do not have access
170to a typesetter, but still have to type mathematics,
171this provides a way to get a typed version of the final output
172which is close enough for debugging purposes,
173and sometimes even for ultimate use.