home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / 1_1_contri / usd / 26_eqn / e6 < prev    next >
Encoding:
Text File  |  1986-05-22  |  4.9 KB  |  176 lines

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