thinking about tex

Chances are that unless you’re a mathematician or a physicist you don’t know anything about TeX. TeX is a computerized typesetting system begun in the late 1970s; since the 1980s, it’s been the standard way in which papers in the hard sciences are written on computers. TeX preceded PostScript, PDF, HTML, and XML, though it has connections to all of them. In general, though, people who aren’t hard scientists don’t tend to think about TeX any more; designers tend to think of it as a weird dead end. But TeX isn’t simply computer history: it’s worth thinking about in terms of how attitudes towards design and process have changed over time. In a sense, it’s one of the most serious long-term efforts to think about how we represent language on computers.
TeX famously began its life as a distraction. In 1977, Donald Knuth, a computer scientist, wanted a better way to typeset his mammoth book about computer science, The Art of Computer Science, a book which he is still in the process of writing. The results of phototypesetting a book heavy on math weren’t particularly attractive; Knuth reasoned that he could write a program that would do a better job of it. He set himself to learning how typesetting worked; in the end, what he constructed was a markup language that authors could write in and a program that would translated the markup language into files representing finished pages that could be sent to any printer. Because Knuth didn’t do anything halfway, he created this in his own programming language, WEB; he also made a system for creating fonts (a related program called Metafont) and his own fonts. There was also his concept of literate programming. All of it’s open source. In short, it’s the consummate computer science project. Since its initial release, TeX has been further refined, but it’s remained remarkably stable. Specialized versions have been spun off of the main program. Some of the most prominent are LaTeX, for basic paper writing, XeTeX, for non-Roman scripts, and ConTeXt, for more complex page design.
How does TeX work? Basically, the author writes entirely in plain text, working with a markup language, where bits of code starting with “” are interspersed with the content. In LaTeX, for example, this:

frac{1}{4}

results in something like this:

onequarter.gif

The “1” is the numerator of the fraction; the “4” is the denominator, and the frac tells LaTeX to make a top-over-bottom fraction. Commands like this exist for just about every mathematical figure; if commands don’t exist, they can be created. Non-math text works the same way: you type in paragraphs separated by blank lines and the TeX engine figures out how they’ll look best. The same system is used for larger document structures: the documentstyle{} command tells LaTeX what kind of document you’re making (a book, paper, or letter, for example). chapter{chapter title} makes a new chapter titled “chapter title”. Style and appearance is left entirely to the program: the author just tells the computer what the content is. If you know what you’re doing, you could write an entire book without leaving your text editor. While TeX is its own language, it’s not much more complicated than HTML and generally makes more sense; you can learn the basics in an afternoon.
To an extent, this is a technologically determined system. It’s based around the supposition of limited computing power: you write everything, then dump it into TeX which grinds away while you go out for coffee, or lunch, or home for the night. Modern TeX systems are more user friendly: you can type in some content and press the “Typeset” button to generate a PDF that can be inspected for problems. But the underlying concept is the same: TeX is document design that works in exactly the same way that a compiler for computer programs. Or, to go further back, the design process is much the same as metal typesetting: a manuscript is finished, then handed over to a typesetter.
This is why, I think, there’s the general conception among designers that TeX is a sluggish backwater. While TeX slowly perfected itself, the philosophy of WYSIWYG – What You See Is What You Get – triumphed. The advent of desktop publishing – programs like Quark XPress and Pagemaker – gave anyone with a computer the ability to change the layouts of text and images. (Publishing workflows often keep authors from working directly in page layout programs, but this is not an imposition of software. While it was certainly a pain to edit text in old versions of PageMarker, there’s little difference between editing text in Word and InDesign.) There’s an immediate payoff to a WYSIWYG system: you make a change and its immediately reflected in what you see on the screen. You can try things out. Designers tend to like this, though it has to be said that this working method has enabled a lot of very bad design.
(There’s no shortage of arguments against WYSIWYG design – the TeX community is nothing if not evangelical – but outside of world of scientific writing, it’s an uphill battle. TeX seems likely to hold ground in the hard sciences. There, perhaps, the separation between form and content is more absolute than elsewhere. Mathematics is an extremely precise visual embodiment of language; created by a computer scientist, TeX understands this.)
As print design has changed from a TeX-like model to WYSIWYG, so has screen design, where the same dichotomy – code vs. appearance – operates. Not that document design hasn’t taken something from Tex: TeX’s separation of content from style becomes a basic principle in XML, but where TeX has a specific task, XML generalizes. But in general, the idea of leaving style to those who specialize in it (the designer, in the case of print book design, the typesetting engine in TeX) is an idea that’s disappearing. The specialist is being replaced by the generalist. The marketer putting bulletpoints in his PowerPoint probably formats it himself, though it’s unlikely he’s been trained to do so. The blogger inadvertently creates collages by mixing words and images. Design has been radically decentralized.
The result of this has been mixed: there’s more bad design than ever before, simply because there’s more design. Gramsci comes uncomfortably to mind: “The crisis consists precisely in the fact that the old is dying and the new cannot be born; in this interregnum a great variety of morbid symptoms appear.” If TeX comes from an old order, it’s an order with admirable clarity of purpose. Thinking about TeX points out an obvious failure in the educational system that creates the current environment: while most of us are taught, in some form or another, to write, very few are taught to visually present information, and it’s not clear that a need for this is generally perceived. If we’re all to e designers, we have to all think like designers.

10 thoughts on “thinking about tex

  1. Liza Daly

    Perhaps ironically, I used LaTeX in college to write my psychology papers — specifically for its design. I love the studious, scientific look [PDF] of documents produced with it, and I hoped it would set up an unconscious expectation of excellence in whoever was grading the paper.
    (As a side note, searching for ‘LaTeX’ in Google Image Search does not provide the expected screenshots of research papers.)

  2. dan visel

    I certainly wouldn’t argue that LaTeX does a bad job of design – if anything, the opposite is true, it’s almost impossible to get it to make anything look bad. It does, however, have a very particular design sensibility – 99% of the time you can instantly tell that something’s a product of LaTeX.
    (I myself once got a design job because my employers recognized that my résumé had been done in TeX.)

  3. bob stein

    lovely thought piece Dan, thank you.
    you say at the end . . . “If we’re all to be designers, we have to all think like designers.”
    what do you mean by “think like designers”? this is particularly slippery ground when, as you say quoting Gramsci “the old is dying and the new cannot be born.” Designers, even if they work primarily in the dynamic environment of the web have almost certainly been trained in schools and shops which are steeped in the hierarchies of print. Getting out from under that weight is going to be a decades long proposition. my sense is that some of what we call “bad design” should be re-named failed experiments. and we need to look more carefully at these failures to learn from them.

  4. Paul Topping

    Dan says,
    “… but outside of world of scientific writing, it’s an uphill battle. TeX seems likely to hold ground in the hard sciences.”
    I worry that readers might think that most “real scientists” use TeX. TeX users would certainly like this to be true. However, after having done a survey of scientific publishers to which scientists submit research papers, only 10% of papers containing math notation are done in TeX or LaTeX these days. The rest are done in Microsoft Word with the equations created with its Equation Editor or MathType, its full-featured version.
    In the interest of full disclosure, I work for Design Science, the makers of MathType and Equation Editor. I really have nothing against TeX. It does a great job at what it is intended. However, it is not ubiquitous as other would like you to believe and it is not easy to use as the many mailing lists and forums devoted to its support show. Finally, it is a world unto itself. For publishers, it is hard to hire staff that are trained in TeX and it does not interface well with modern publishing software. For authors, you must do all your work in TeX. For example, if you want to put an equation in a PowerPoint slide show, good luck. (Yes, I know that there are TeX-based slide making macros and packages that create equation images than can be inserted into slides.)

  5. Chris E

    Dan, documentclass{}, you mean, rather than documentstyle{}.
    More significantly, I do think that most LaTeX output is instantly recognizable as such, but that that’s mostly because LaTeX makes it easy to avoid making any style choices when typesetting an article. So people don’t make those choices, even though they could. (And because Computer Modern font is distinctive, and Word, the most likely candidate, does a recognizably bad job of straight margins – ?something TeX excels at.) But that is not because it is difficult or impossible to make style choices, but rather only because writers forego making them, because LaTeX’s standards are pretty nice.
    But beyond its defaults, LaTeX is wonderfully flexible, when you learn to play with it a bit, especially by learning the parameters of the various packages available.

  6. dan visel

    Bob says:
    what do you mean by “think like designers”? this is particularly slippery ground when, as you say quoting Gramsci “the old is dying and the new cannot be born.” Designers, even if they work primarily in the dynamic environment of the web have almost certainly been trained in schools and shops which are steeped in the hierarchies of print. Getting out from under that weight is going to be a decades long proposition. my sense is that some of what we call “bad design” should be re-named failed experiments. and we need to look more carefully at these failures to learn from them.
    I think that’s what I’m getting at – the hierarchies of print are embodied in design, though perhaps it’s less a hierarchy than a sequential process. TeX might be seen as an endpoint of that kind of sequential design: it does that sort of design as perfectly as can be imagined. I think design pedagogy is something that needs to be looked at more intensely, particularly in the realm of non-professional design. The idea that content is entirely separate from presentation remains a prevalent paradigm. There’s not a lot of careful looking.
    Chris E: thanks for the correction – it’s been a while and I was writing too quickly.

  7. bowerbird

    heavy markup is dead.
    light markup is the future.
    tex is great, until you want to put your work up
    on the web. but who wants to do that these days?
    really, what’s needed (and i have a handle on it)
    is an app that understands what you mean to say,
    and how it should be presented, and does _that_,
    solidly maintaining the structure of your text,
    without making you do _any_ “markup” at all…
    -bowerbird

  8. Edward Visel

    I know a few people at Pomona that use LaTeX, particularly a math/econ double major. The real problem, though, lies in the fact that for the average user who only writes in Word, formatting an even moderately complicated math equation or graph is too complicated, even if Word contains one of the easier to use equation editors (though it is somewhat hidden). The possible solutions to this problem as I see it:
    1. Mixing digital and analog by leaving space and penciling in formulas and graphs (I have had professors ask for this just because of its simplicity).
    2. Full auto-markup, as bowerbird proposed above. I’m not sure how this would work for math equations, though Microsoft Equation Editor seems headed in that direction. My two issues with this approach more generally are
    a) it inhibits creativity and implies that there is a single correct format for any particular text (more true of equations than mosts varieties of text, ergo TeX), and
    b) that the current incarnations we have of it (automatic bulleting, lists, tables, Times New Roman, etc. in Word, for example) are a horror to work with. Last night, for example, in a Word document imported into Pages, I found that it was impossible to lift the auto-formatting of a list in order to set a paragraph back half an inch short of reformatting the entire document.
    3. Everyone learning a little formatting. While this seems to be the best idea, I am not sure it will work unless programs like Word improve or remove their default formatting, because otherwise people such as my professors that ask for papers in Times New Roman will continue to follow the path of least resistance, even if it’s ugly as hell.

  9. Neven

    As someone working in the humanities, I must say that LaTeX makes it possible for me to typeset a critical edition (a text in whose footnotes are recorded different readings from different manuscripts) on my own, with appealing results. This is impossible to achieve either in a WYSIWYG text processor (apart from one specially designed for that task), or by instructing most designers / typesetters, who — at least in this part of the world — often have no idea what a critical edition is or how it should look like.

  10. Samuel Erenstein

    It is inconceivable that anyone would choose to use a markup language like TeX in order to publish a paper. Mathtype & MS Word all the way.
    I have used Design Science’s Mathtype since 1995, published a 275-page doctoral dissertation and 7 papers in peer-reviewed journals, all with Mathtype & MS Word. From time to time, since 1990, I looked at TeX and its variants. I have never seen a system where one has to spend so much time – 99.99% of it – searching for specific code, worrying how to display math, instead of thinking about content. WYSIWYG systems like Mathtype free the user from thinking about presentation.

Comments are closed.