TUGboat, Volume 32 (2011), No. 3.

## Book review: LaTeX and Friends

It is difficult to write a new and original introductory book about LaTeX today. The author must compete with a number of great books, including freely available ones like  [1]. Some these books were written by the authors or primary developers of the language  [2345]. Still, people have been writing mathematics textbooks for several thousand years, and nevertheless new ones continue to be written.

The way one can judge introductory LaTeX textbooks is similar to how figure skating is judged. There are several “required elements” which must be present in any book, like the explanation of LaTeX macros and workflow. There are also several “free elements” like additional packages or tricks the author chooses to include. The book can be evaluated by the pedagogical skill with which the author performed the “required elements”, introducing the fundamentals of LaTeX, and by his choice of the “free” ones.

The new book by Marc van Dongen deserves high scores in both categories.

The first two parts of the book, Basics and Basic Typesetting discuss the material one can expect to find in any LaTeX textbook: the organization of LaTeX documents, the language constructs, the alphabet, etc. They are explained lucidly and well. What distinguishes this book from many other texts is that the author stresses the fact that LaTeX is a programming language, and therefore a LaTeX file is actually a program that instructs the computer to create the final product: the typeset pages on paper or on screen. This means, writes the author, that you can use software engineering techniques such as top-down design and stepwise refinement.

This is a very important fact, which must be explained to the students of TeX and LaTeX, especially those who are accustomed to WYSIWYG documents. A WYSIWYG document presents itself as “the final product” (this is a deception of sorts because, as any experienced user can attest, “what you finally get” is emphatically not “what you see”), while a TeX document is best viewed as a program to produce “the final product”. The author returns to this many times, discussing such software engineering concepts as maintainability applied to TeX documents. This approach would likely be very comfortable and familiar for engineers and software developers.

The author’s use of Unix-like syntax for his examples adds to the impression that the target audience of the book is the people who are not afraid of compilers and can write some code. This is a very welcome development. Too often publishers prefer to print computer-related books intended for “dummies” or even “complete idiots”. While geniuses arguably do not need introductory texts, there is a perceptible dearth of books for the reasonably intelligent person. LaTeX and Friends is definitely one of such books, and it makes for pleasant and useful reading.

Since The TeXbook  [6], many books about TeX discuss not only the typesetting program, but also other aspects of typographic art and science, discussing the rules for book design and the best practices. LaTeX and Friends follows this tradition, and Bringhurst’s immortal Elements  [7] is one of the most often cited books in the text. The reader learns many useful typographic facts, such as setting the punctuation symbols at the border of two types in the brighter type, the spacing in abbreviations and initials, etc. Many people from the intended audience get their first exposure to the typography from TeX-related books, and this one provides a good introduction to the subject.

The author chooses PDF mode as the main way to produce the result—probably a sensible choice nowadays. He does discuss DVI mode as a quick way to get a preview of the typeset pages. He obviously prefers biblatex to the “traditional” BibTeX interface to the bibliography. Still, a description of the natbib package would be a useful addition to the discussion of the author–year bibliographies.

The third part of the book discusses Tables, Diagrams and Data Plots. It contains a detailed introduction to the TikZ suite—probably one of the best existing descriptions of this highly useful package. This description alone makes the book worth buying. The section on tables, however, is smaller and less detailed; the reader who needs more should probably turn to the recent book by Herbert Voß  [8] dedicated to typesetting tables in LaTeX.

The fourth part of the books is called Mathematics and Algorithms. The author discusses the use of amsmath and the related packages from the American Mathematical Society. Again, a reader who needs a detailed description of these packages may want to consult the books which deal with them as a primary topic, such as the two volumes by George Grätzer  [910]. A chapter or two in a general textbook, of course, cannot be a comprehensive description of these large packages. One can always argue with the author’s choice: for example, van Dongen discusses the split environment, but does not mention multline, while I find the latter more useful than the former. I also would argue that the only “discussion” of eqnarray environment should be the warning: “never use this ugly monster!” A stranger omission happens in the discussion of variable sized delimiters, where the author explains the usage of \left and \right keywords for automatic sizing (with a useful trick of \vphantom for the proper sizing of multi-line expressions), but does not mention the manual sizing with \Biggl, \Bigl, \bigl commands and their “right” complements. The description of the listings package is rather short and does not mention many of its useful features. On the other hand, the discussion of the algorithm2e package is very detailed and well written.

The fifth part of the book, Automation, deals with the definition of new macros. It is probably intended for a more advanced reader than the rest of the book. The discussion of branching, loops and switching there is rather interesting, as well as containing some introductory remarks on the TeX interface (as opposed to the LaTeX interface).

The last part, Miscellany, includes a couple of chapters on various topics that do not fit into the other parts. It has a short but well written introduction to beamer presentations, a chapter on writing classes and packages, and a chapter on using OpenType fonts. The chapter on writing classes and packages is probably not as good as the famous guide  [11], and does not cover the use of .dtx file for self-documenting code. The chapter on OpenType fonts contains an interesting discussion of a more esoteric topic. I wonder whether some script to automate this, e.g., using fontinst  [1213] for some parts of the process, would help.

The book is well typeset using the FF Nexus font family. Unlike many other books on TeX, it has a detailed colophon, adding to the pedagogical value of the book. It has a good index separated into categories, and a short dictionary of typographic jargon.

This is a very useful book which can be recommended as a textbook on LaTeX for an introductory course or for self-education. It has chapters interesting for beginners and for experienced TeXnicians, and will be a welcome addition to either bookshelf.

### References

[1]   Tobias Oetiker, Hubert Partl, Irene Hyna, and Elisabeth Schlegl. The Not So Short Introduction to LaTeXe, April 2011. http://mirrors.ctan.org/info/lshort.

[2]   Leslie Lamport. LaTeX: A Document Preparation System. Addison-Wesley Publishing Company, Reading, MA, second edition, 1994. Illustrations by Duane Bibby.

[3]   Frank Mittelbach, Michel Goossens, Johannes Braams, David Carlisle, and Chris Rowley. The LaTeX Companion. Addison-Wesley Series on Tools and Techniques for Computer Typesetting. Addison-Wesley Professional, Boston, second edition, 2004.

[4]   Michel Goossens, Sebastian Rahtz, and Frank Mittelbach. The LaTeX Graphics Companion: Illustrating Documents With TeX and PostScript. Addison-Wesley Series on Tools and Techniques for Computer Typesetting. Addison-Wesley, Reading, MA, 1997.

[5]   Michael Goossens, Sebastian Rahtz, Eitan M. Gurari, Ross Moore, and Robert S. Sutor. The LaTeX Web Companion: Integrating TeX, HTML, and XML. Addison-Wesley Series on Tools and Techniques for Computer Typesetting. Addison Wesley Longman, Reading, MA, 1999.

[6]   Donald Ervin Knuth. The TeXbook. Computers & Typesetting A. Addison-Wesley Publishing Company, Reading, MA, 1994. Illustrations by Duane Bibby.

[7]   Robert Bringhurst. The Elements of Typographic Style. Hartley & Marks, Publishers, Vancouver, BC, Canada, 2004.

[8]   Herbert Voß. Typesetting Tables with LaTeX. Cambridge UIT, 2011.

[9]   George Grätzer. Math into LaTeX. Birkhäuser, Boston, third edition, 2000.

[10]   George Grätzer. More Math into LaTeX. Springer, New York, fourth edition, 2007.

[11]   LaTeX3 Project. LaTeXe For Class and Package Writers, 2006. http://mirrors.ctan.org/macros/latex/doc/clsguide.pdf.

[12]   Philipp Lehman. The Font Installation Guide, December 2004. http://mirrors.ctan.org/info/Type1fonts/fontinstallationguide.

[13]   Alan Jeffrey, Rowland McDonnell, and Lars Hellström. Fontinst: Font Installation Software for TeX, December 2004. http://mirrors.ctan.org/fonts/utilities/fontinst.

Computational Materials Science Center, MS 6A2
George Mason University
Fairfax, VA 22030, USA
borisv (at) lk dot net

$Date: 2011/10/13 22:34:55$