7.  Conclusions

      We think we have shown that it is possible to do acceptably good typesetting of mathematics on a phototypesetter, with an input language that is easy to learn and use and that satisfies many users' demands. Such a package can be implemented in short order, given a compiler-compiler and a decent typesetting program underneath.

      Defining a language, and building a compiler for it with a compiler-compiler seems like the only sensible way to do business. Our experience with the use of a grammar and a compiler-compiler has been uniformly favorable. If we had written everything into code directly, we would have been locked into our original design. Furthermore, we would have never been sure where the exceptions and special cases were. But because we have a grammar, we can change our minds readily and still be reasonably sure that if a construction works in one place it will work everywhere.

Acknowledgements

      We are deeply indebted to J. F. Ossanna, the author of TROFF, for his willingness to modify TROFF to make our task easier and for his continuous assistance during the development of our program. We are also grateful to A. V. Aho for help with language theory, to S. C. Johnson for aid with the compiler-compiler, and to our early users A. V. Aho, S. I. Feldman, S. C. Johnson, R. W. Hamming, and M. D. McIlroy for their constructive criticisms.

References

[1]
A Manual of Style, 12th Edition. University of Chicago Press, 1969. p 295.
[2]
Model C/A/T Phototypesetter. Graphic Systems, Inc., Hudson, N. H.
[3]
Ritchie, D. M., and Thompson, K. L., ``The UNIX time-sharing system.'' Comm. ACM 17, 7 (July 1974), 365-375.
[4]
Ossanna, J. F., TROFF User's Manual. Bell Laboratories Computing Science Technical Report 54, 1977.
[5]
Aho, A. V., and Johnson, S. C., ``LR Parsing.'' Comp. Surv. 6, 2 (June 1974), 99-124.
[6]
B. W. Kernighan and D. M. Ritchie, The C Programming Language. Prentice-Hall, Inc., 1978.

Typesetting Mathematics _ User's Guide (Second Edition)

Brian W. Kernighan and Lorinda L. Cherry

ABSTRACT

      This is the user's guide for a system for typesetting mathematics, using the phototypesetters on the UNIXand GCOS operating systems.

      Mathematical expressions are described in a language designed to be easy to use by people who know neither mathematics nor typesetting. Enough of the language to set in-line expressions like [equation] or display equations like

[equation]

[equation]

[equation]

can be learned in an hour or so.

      The language interfaces directly with the phototypesetting language TROFF, so mathematical expressions can be embedded in the running text of a manuscript, and the entire document produced in one process. This user's guide is an example of its output.

      The same language may be used with the UNIX formatter NROFF to set mathematical expressions on DASI and GSI terminals and Model 37 teletypes.