FormaTeX

\compare{tex-vs-latex}

TeX vs LaTeX

TeX is a typesetting engine. LaTeX is a document preparation system built on top of it. Understanding the distinction explains why they feel so different — and why virtually everyone who uses one actually uses the other.

TeX— typesetting engineLaTeX— document system on top of TeX

Short answer: If you are writing a paper, thesis, book, or presentation, you should use LaTeX (or more precisely: a LaTeX engine like pdfLaTeX, XeLaTeX, or LuaLaTeX). TeX in isolation is used only by format developers and those building systems on top of the engine itself. In practice, when people say "I write in TeX", they almost always mean LaTeX.

\section{What is TeX}

TeX: the typesetting engine

TeX was created by Donald Knuth between 1977 and 1989 to produce the highest quality mathematical typography possible. It is a macro-processing language and a typesetting engine combined.

At its core, TeX thinks in terms of boxes and glue. Every character is a box. Spaces are glue — elastic connectors with natural width, stretch, and shrink. The engine solves a global optimisation problem to break paragraphs into lines with minimal badness, then breaks pages the same way.

TeX primitives include commands like \hbox, \vbox, \penalty, \kern, \hskip. These are the atoms from which all higher-level constructs are built.

Created1977–1989 by Donald E. Knuth
PurposeTypesetting engine and macro processor
VersionConverges to π (3.14159…); intentionally frozen
FormatPlain TeX — minimal macros on top of the engine
OutputDVI (device-independent) by default

\section{What is LaTeX}

LaTeX: the document preparation system

LaTeX was created by Leslie Lamport in the early 1980s as a set of macros layered on top of TeX. Instead of writing TeX primitives, you write semantic commands: \section{Title}, \begin{equation}, \cite{key}. LaTeX expands these into the correct TeX primitives.

LaTeX introduces document classes (article, book, beamer) that define the overall page layout, sectioning hierarchy, and typography. A package system (CTAN) provides thousands of extensions for everything from chemistry to music.

The current standard is LaTeX2e (1994). LaTeX3 components — the expl3 programming layer and many modern packages — are actively developed and widely deployed.

Created1983–1984 by Leslie Lamport
Current versionLaTeX2e (1994), actively maintained
Built onTeX engine (pdfTeX, XeTeX, LuaTeX…)
Package registryCTAN — 6,000+ packages
OutputPDF (via pdfLaTeX, XeLaTeX, LuaLaTeX)

\subsection{Analogies}

A useful mental model

The TeX/LaTeX relationship mirrors the assembly/high-level-language relationship in software development. The lower level gives complete control; the higher level gives productivity.

TeXAssembly language

Like assembly, TeX gives you total control over every operation. You specify exact box dimensions, glue, penalties, and kerns. Extremely powerful — and extremely verbose for everyday tasks.

LaTeXHigh-level language

Like Python or C++ compared to assembly, LaTeX provides abstractions: \section{} expands into dozens of TeX primitives. You express intent; the macros handle the details.

The full stack

Your .tex fileLaTeX macrosTeX enginePDF output

\begin{examples}

The same goal, two levels of abstraction

Both snippets produce a formatted document. The LaTeX version uses a single\documentclass declaration; plain TeX requires manual font declarations and pagination commands.

Plain TeX
% Plain TeX — low-level typesetting primitives
\font\titlefont = cmr12 at 14pt
\font\bodyfont  = cmr10 at 11pt

{\titlefont A Plain TeX Document\par}
\medskip
{\bodyfont
This paragraph uses plain TeX primitives. There is no \\documentclass,
no \\section, and no package manager — only engine-level commands.\par}

\vfill\eject   % eject the current page
\bye            % terminate the document
LaTeX
% LaTeX — document preparation system built on top of TeX
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}

\title{A \LaTeX\ Document}
\author{Author Name}
\date{\today}

\begin{document}
\maketitle

\section{Introduction}
LaTeX macros like \verb|\section| and \verb|\maketitle| expand into
dozens of TeX primitives automatically. You describe document structure;
TeX handles the typesetting details.

\end{document}

\subsection{Feature Matrix}

Side-by-side comparison

Aspect
TeX
LaTeX
Level
Typesetting engine
Document preparation system
Commands
Low-level primitives
High-level semantic macros
Learning curve
Very steep
Moderate
Document classes
None built-in
article, report, book, beamer…
Package ecosystem
Very limited
Thousands on CTAN
Cross-references
Manual page numbers
\label / \ref / \cite
Bibliography
Manual formatting
BibTeX / BibLaTeX + Biber
Math support
Plain TeX math
amsmath, unicode-math, more

\subsection{Who should use which}

Choosing the right level

Use LaTeX

For virtually every document: academic papers, theses, books, reports, CVs, presentation slides (Beamer), and technical documentation.

  • Scientists, academics, and researchers
  • Students writing theses or assignments
  • Engineers and technical writers
  • Anyone needing structured documents with references
Work directly with TeX

Plain TeX (or other TeX formats like ConTeXt) is appropriate only in very specialised scenarios.

  • Building a custom TeX macro format from scratch
  • Developing TeX-based tooling or engines
  • Deep debugging of low-level typesetting behaviour
  • Working with TeX-based formats like ConTeXt
Compile LaTeX in your browser

Start writing LaTeX today

FormaTeX runs pdfLaTeX, XeLaTeX, and LuaLaTeX instantly. No installation, no configuration — just a browser and your .tex source.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy