Est. 1978 Intermediate

TeX / LaTeX

Donald Knuth's TeX typesetting system and Leslie Lamport's LaTeX macro package — the markup and macro language that sets the standard for mathematical and scientific document typesetting.

Created by Donald E. Knuth (TeX); Leslie Lamport (LaTeX)

Paradigm Markup and macro expansion; TeX is a Turing-complete macro-expansion language, LaTeX a macro package layered on top of it
Typing Untyped in the conventional sense; TeX operates on tokens, registers (integers, dimensions, glue, boxes), and macros rather than data types
First Appeared TeX in 1978; LaTeX in 1984
Latest Version TeX 3.141592653 (last updated 2021); LaTeX2e, maintained on a roughly biannual release schedule (latest releases around 2024)

TeX (pronounced “tech,” after the Greek letters τεχ) is a typesetting system designed and written by computer scientist Donald E. Knuth, first released in 1978. LaTeX is a set of macros written on top of TeX by Leslie Lamport in the mid-1980s that turns Knuth’s low-level typographic engine into a document-preparation system organized around logical structure — sections, theorems, figures, citations — rather than raw layout commands. Together they form the standard toolchain for typesetting mathematical, scientific, and technical documents, prized above all for the quality of their equation setting and the reproducibility of their output.

Strictly, TeX is two things at once: a typesetting engine and a programming language. Everything a TeX document does — from placing a character to defining an entire document class — happens through macro expansion, and the macro language is powerful enough to be Turing-complete. LaTeX is simply the most influential body of macros ever written for it.

History & Origins

The story begins with frustration. In 1977 Knuth received the galley proofs for the second edition of the second volume of The Art of Computer Programming and found the new phototypesetting badly inferior to the old hot-metal setting of the first edition. Rather than accept it, he decided to write his own typesetting software. On 13 May 1977 he wrote a memo to himself sketching the basic features of TeX, expecting to finish it during a sabbatical the following year.

The first version, TeX78, was written in the SAIL programming language and ran on a PDP-10 under Stanford’s WAITS operating system. What Knuth expected to be a short detour became a decade-long project. In 1982 he published TeX82, a complete rewrite composed in his own WEB literate-programming system (which tangled and wove a single source into both compilable Pascal and typeset documentation). TeX82 made two decisions that still define the system: it used fixed-point arithmetic so that a document would render identically on any hardware, and — after energetic lobbying by Guy Steele — it exposed a real, Turing-complete programming language rather than a fixed set of commands.

LaTeX arrived because plain TeX, while powerful, was demanding to use directly. Around 1983–1984, Leslie Lamport at SRI International wrote a macro package that let authors describe a document’s structure and leave the typography to the system. He released version 2.06a in September 1984, and LaTeX 2.09 in August 1985 became the last of his own versions; the accompanying manual appeared in 1986 and sold hundreds of thousands of copies. In 1989, at a TUG meeting at Stanford, Lamport handed maintenance to Frank Mittelbach and the LaTeX3 project, who in 1994 released LaTeX2e — the unified, stable version still in use today.

Design Philosophy

TeX and LaTeX embody two complementary philosophies.

  • Knuth’s TeX: correctness and permanence. TeX was built to be a stable, bug-free foundation that would produce the same output forever. Its version number famously converges on π (currently 3.141592653), and Knuth has declared that on his death the version will become π and any remaining bugs will thereafter be considered features. Fixed-point math, an obsessive line-breaking algorithm that optimizes whole paragraphs at once, and meticulous handling of spacing (TeX’s “glue”) all serve the goal of typographic excellence that never drifts.

  • Lamport’s LaTeX: logical structure over visual formatting. LaTeX asks the author to mark what something is — \section, \emph, \begin{theorem} — and defers how it looks to document classes and packages. This separation of content from presentation makes documents portable across styles, keeps cross-references and numbering automatic, and lets an entire journal enforce house style by shipping a single class file.

Key Features

  • Mathematical typesetting. TeX’s math mode remains the benchmark for rendering equations, and its notation has become the lingua franca of technical writing — reused far beyond TeX itself in tools like MathJax, KaTeX, and countless web and chat platforms.
  • The macro language. Because everything is a macro, users can redefine or extend virtually any behavior. This flexibility powers thousands of packages but also makes advanced TeX programming notoriously intricate.
  • Automatic cross-referencing. Labels, references, tables of contents, bibliographies (via BibTeX/BibLaTeX), and indexes update themselves as a document changes.
  • METAFONT and Computer Modern. Knuth wrote a companion system, METAFONT, to design the Computer Modern typefaces used by classic TeX documents, treating letterforms themselves as programmable.
  • Reproducibility. Fixed-point arithmetic guarantees that a source file produces byte-for-byte comparable output across machines and years.
  • A vast ecosystem. The Comprehensive TeX Archive Network (CTAN), announced in 1993, hosts thousands of packages, and distributions like TeX Live and MiKTeX bundle the engines, macros, and fonts together.

A small LaTeX document shows the structure-first style:

1
2
3
4
5
6
7
8
9
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section{Introduction}
Euler's identity is
\begin{equation}
  e^{i\pi} + 1 = 0.
\end{equation}
\end{document}

Evolution

While Knuth froze TeX’s core with the release of version 3.0 in 1990 — thereafter making only rare bug fixes — the surrounding ecosystem never stopped moving. A family of derived engines modernized what the frozen core deliberately left alone: pdfTeX (by Hàn Thế Thành, from the late 1990s) output PDF directly instead of DVI; XeTeX (Jonathan Kew, 2004) added native Unicode and system OpenType/TrueType fonts; and LuaTeX (stable in 2010) embedded the Lua scripting language to make the engine programmatically extensible. On the macro side, the long-running LaTeX3 effort produced the expl3 programming layer, which in 2020 was folded into the standard LaTeX2e kernel, giving mainstream LaTeX a modern, consistent programming interface without breaking decades of existing documents.

Current Relevance

TeX and LaTeX remain the dominant tools for serious mathematical and scientific writing. arXiv compiles LaTeX submissions across physics, mathematics, and computer science; academic publishers ship LaTeX templates as a matter of course; and collaborative editors like Overleaf have brought the system to a new generation who never touch a command line. Modern distributions run on macOS, Windows, and Linux, and community images such as the TeX Live project’s Docker image make reproducible builds easy in CI pipelines. Nearly half a century after its debut, the toolchain is not merely surviving but is the unquestioned standard in its domain.

Why It Matters

Few pieces of software have shaped scholarship as durably as TeX. It set a bar for typographic quality that commercial word processors still struggle to match in mathematics, and it demonstrated that a program could be engineered for permanence — stable, portable, and reproducible for decades. Its math notation escaped the system entirely to become the way scientists write equations everywhere, on paper and on the web. And as one of the earliest and most celebrated examples of literate programming, free software, and community-maintained infrastructure, the TeX ecosystem is both a working tool millions rely on and a landmark in the history of computing.

Timeline

1977
On 13 May 1977, Donald Knuth writes a memo describing the basic features of a new typesetting system, motivated by his dissatisfaction with the galleys for the second edition of The Art of Computer Programming
1978
The first version, TeX78, is released; it is written in the SAIL programming language and runs on a PDP-10 under Stanford's WAITS operating system
1980
The TeX Users Group (TUG) is founded to support and promote TeX and its community
1982
TeX82, rewritten from scratch in the WEB literate-programming system (compiled via Pascal), is published; it uses fixed-point arithmetic for reproducibility and, after lobbying by Guy Steele, is a Turing-complete macro language
1984
Leslie Lamport, working at SRI, releases the first versions of his LaTeX macros (version 2.06a in September 1984), providing a higher-level document-structuring layer over TeX
1985
LaTeX 2.09 is released — the last version of Lamport's original LaTeX; the LaTeX user's manual follows in 1986
1989
At a TUG meeting at Stanford, Lamport agrees to hand over maintenance and development of LaTeX to Frank Mittelbach and the LaTeX3 team
1990
TeX 3.0 is released on 15 March 1990, adding 8-bit input and improved multilingual hyphenation; the design is frozen thereafter, with subsequent updates limited to bug fixes, and from version 3 onward updates append a digit that drives the version number toward π
1993
The Comprehensive TeX Archive Network (CTAN) is officially announced at the EuroTeX conference at Aston University, giving the ecosystem a central package repository
1994
LaTeX2e is released as a unified, stable standard, replacing the incompatible LaTeX 2.09 and NFSS/SLiTeX variants; it remains the current standard version
2004
Jonathan Kew releases XeTeX, extending the engine with native Unicode input and modern OpenType/TrueType font support; pdfTeX (Hàn Thế Thành, from the late 1990s) and later LuaTeX (stable 2010) similarly modernize the engine
2020
The LaTeX3 programming layer (expl3) is integrated into the standard LaTeX2e kernel, bringing a modern, consistent programming interface to mainstream LaTeX; TeX itself reaches version 3.141592653 in a 2021 update

Notable Uses & Legacy

arXiv

The arXiv preprint server, central to physics, mathematics, and computer science, accepts and compiles LaTeX source for hundreds of thousands of papers, making LaTeX the de facto submission format for scientific research.

American Mathematical Society

The AMS developed AMS-TeX and the AMS-LaTeX package suite (amsmath, amssymb, amsthm) that define how professional mathematics is typeset, and uses TeX-based workflows for its journals and books.

Academic journals and publishers

Publishers such as Springer, Elsevier, IEEE, and SIAM distribute official LaTeX class files and templates so authors can submit camera-ready manuscripts that match each journal's house style.

The Art of Computer Programming

Knuth created TeX specifically to typeset his multi-volume magnum opus; the books — together with their Computer Modern fonts from the companion METAFONT system — remain the original showcase of the system's typographic quality.

Overleaf

The collaborative, browser-based LaTeX editor Overleaf lets researchers write and compile documents together in real time, and is widely adopted by universities and research institutions worldwide.

Theses, books, and technical documentation

Graduate students, technical authors, and O'Reilly-style publishers use LaTeX for dissertations, textbooks, and manuals where precise control over structure, cross-references, bibliographies, and mathematics matters.

Language Influence

Influenced By

Scribe

Influenced

ConTeXt Texinfo MathJax AsciiMath

Running Today

Run examples using the official Docker image:

docker pull texlive/texlive:latest

Example usage:

docker run --rm -v $(pwd):/app -w /app texlive/texlive:latest pdflatex hello.tex
Last updated: