home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / doc / eqn / e6 < prev    next >
Encoding:
Text File  |  1979-01-10  |  4.9 KB  |  174 lines

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