\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.
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.
\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.
\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.
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.
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
\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 — 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 — 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
\subsection{Who should use which}
Choosing the right level
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
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
Start writing LaTeX today
FormaTeX runs pdfLaTeX, XeLaTeX, and LuaLaTeX instantly. No installation, no configuration — just a browser and your .tex source.

