13. Tex and Latex
Society for Industrial and Applied Mathematics eBooks · 1998
TEX can print virtually any mathematical thought that comes into your head, and print it beautifully. — HERBERT S. WILF, TEX: A Non-review (1986) I can't compose at a typewriter. I can't even compose a letter to my relatives on a typewriter, even though I'm a good typist. — DONALD E. KNUTH, in Mathematical People: Profiles and Interviews (1985) 1992: Extensive testing shows that 98.3% of the time no matter which of the [h], [t], [b], or [p] options is used, LATEX will put your table at the end of the document. — DAVID F. GRIFFITHS and DESMOND J. HIGHAM, Great Moments in LATEX History (1997) If you don't find it in the index, look very carefully through the entire catalogue. — SEARS, ROEBUCK and CO., Consumer's Guide (1897) Wordprocessing systems have brought a new dimension to writing. Courses are offered on writing with a computer, and books have been written on the subject [205], [302]. Producing mathematical equations is difficult or impossible with wordprocessors not designed for the purpose, but various specially designed systems are available. Because it is ubiquitous in the mathematical and computer science communities I focus in this chapter on the TEX typesetting system (the “EX” is usually pronounced like the eck in deck) and the LATEX macro package. The troff system (with the eqn preprocessor for typesetting mathematics [151]) predates TEX and was widely used on Unix systems, but has now largely been supplanted by TEX. My purpose is not to describe or teach TEX and LATEX or the associated programs BibTEX and MakeIndex (see the references in §13.5 for suggested texts) but to explain their advantages and to give hints on their use. 13.1. What are TEX and LATEX? TEX was developed by Donald Knuth at Stanford University, beginning in the late 1970s [161]. Knuth originally designed TEX to help him typeset books in his Art of Computer Programming series. It is a program that accepts a text file interspersed with formatting commands and translates it into a dvi (device independent) file that can readily be translated into the languages understood by output devices such as screens and laser printers. The typical usage is to prepare an ASCII file using your favourite editor, run it through TEX and preview the output on the screen. You correct errors by editing the source file and then re-running TEX. When you wish to obtain hard copy, you invoke a driver to render the TEX output on the printer. LATEX [172] by Leslie Lamport is a macro package that “sits on top” of TEX. It was originally released in 1985 and rapidly became the package of choice for TEX-using authors in computer science, mathematics, and related areas. I recommend using LATEX rather than TEX, since it provides so many useful features that would have to be programmed if you used TEX. The original version of LATEX, LATEX 2.09, was extended in various ways by many people as its popularity grew, and so suffered from incompatible dialects. This problem was solved by LATEX , which in 1994 replaced LATEX 2.09 as the official version of LATEX. It is supported and maintained (with a new release every six months) by volunteers in the LATEX3 Project, a long term project to produce a completely re-designed and re-implemented version of LATEX. In the remainder of this chapter, “LATEX” refers to LATEX . Another macro package for TEX called -TEX [251], by Michael Spivak, was designed specifically for typesetting mathematics.