On this page
Donald Knuth is the computer scientist behind The Art of Computer Programming, a series of books packed with formulas. In 1977 he was so unhappy with how a new edition of one of them was printed that he put the series on hold and built his own typesetting program. That program, TeX, still sets most of the maths you read in research papers.
Why did Donald Knuth create TeX?
The first edition of The Art of Computer Programming was set in hot metal on a Monotype machine. By the time Knuth prepared a new edition of Volume Two, Monotype had been largely replaced by phototypesetting, and when he received the galley proofs on 30 March 1977 he found them inferior (history of TeX).
In a recorded interview he called the typesetting "abominable" and said the letters "weren't positioned very accurately on the films" (Knuth on Web of Stories). He also recalls proofs of a book from a new digital typesetting machine that "was produced by a computer and it looked gorgeous".
If a machine places every dot, a program can decide exactly where every symbol goes. Maths needs that precision: a superscript slightly too high changes how a formula reads.
How long did it take Knuth to build TeX?
Knuth had planned his first real sabbatical in Chile to work on Volume Four of his series. He cancelled it, stayed at Stanford, put Volume Four on hold from April 1977 and decided to "spend a year writing computer programs that will make my book look okay again" (Knuth on Web of Stories).
One year turned into many. According to the history of TeX, TeX was first released in 1978; it was rewritten from scratch as TeX82, published in 1982; its syntax was not frozen until 1989; and version 3.0 arrived in 1990. Knuth also wrote METAFONT, a companion system for designing fonts, and TeX can use the font measurements it generates (TeX on CTAN). He explained the work to mathematicians in a paper called Mathematical Typography, published in the Bulletin of the American Mathematical Society in 1979.
Is TeX still used for maths papers today?
Yes, mostly through LaTeX. LaTeX is a macro package built on TeX, originally created by Leslie Lamport, that gives you ready-made commands for sections, references and equations (LaTeX on CTAN).
The arXiv team reports that 90% of arXiv's papers are submitted as TeX, "lately almost all LaTeX" (Frankston and colleagues, 2024). arXiv is where many maths and physics researchers post papers first.
What does TeX actually do to an equation?
Take the quadratic formula. In LaTeX you type:
`x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}`
You never say how anything should look. TeX makes these decisions for you:
Letters such as x, a, b and c come out in italic, because they are variables; the numbers 2 and 4 stay upright.
There is space around = and ±, but none inside 4ac, because that is a product.
The exponent 2 is smaller and raised.
The square root sign stretches to cover all of b² − 4ac.
The fraction bar is as wide as the longer of the top and bottom.
One more test: if you type sin x as plain letters, TeX sets s, i and n in italic, as if they were three variables multiplied together. Typing `\sin x` sets "sin" upright, as a function name. Good typesetting is really a set of rules about meaning.
If you want to try this yourself, our guide to LaTeX basics for students walks you through typing any maths equation.
How can you write maths more clearly by hand?
You write exam answers on paper, but TeX's rules work with a pen too. Use this checklist on your next practice paper:
Put each step on its own line and line up the = signs, so an examiner can follow you down the page.
Draw fraction bars as long as the longest part above or below them.
Stretch the root sign over everything that sits under it.
Make brackets tall enough to enclose what is inside, especially around fractions.
Write sin, cos, log and lim as clearly separate words, never run into the variable next to them.
Keep exponents and subscripts visibly smaller and placed clearly up or down.
Say what a new letter stands for the first time you use it.
For board exams, pair this with our guide on how to write maths steps in board exams to secure full marks. If you type up your work, you can also get AI feedback on how you present derivations.
Neat layout helps only if the method underneath is right. When a step goes wrong and you cannot see why, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Knuth spent years so that a formula would look right on the page. Spending an extra ten seconds on each line of your own maths is a much smaller job.



