LaTeX's standard classes — article, report, book, letter, plus the elderly slides — are not five independently written programs. The first three are three outputs of a single source file, classes.dtx, generated with different options. In TeX Live 2024 both report.cls and book.cls run to just under 750 lines, and a diff between them touches only 67 of those lines. Sixty-seven lines are the entire distance between a report and a book. This page reads them: which class has chapters, which prints one- or two-sided, what \frontmatter actually switches, and where the default options disagree — each claim checked against real output rather than repeated from memory.
article, report and book come out of one source file
The three classes are printed from one blueprint. Open article.cls and the header says “classes.dtx (with options: article)”; report.cls and book.cls carry the same line with a different option name. So if you want to know how they differ, running diff beats reading a manual. The difference between article.cls and report.cls is 232 lines; between report.cls and book.cls, 67. Those two numbers are the distances themselves: the jump from article to report adds an entire level of hierarchy, while the move from report to book is a far smaller adjustment. The sections below cover only what actually appears in those diffs.
# the header that gives the game away, and the two distances
head -8 "$(kpsewhich book.cls)" | grep classes.dtx
# %% classes.dtx (with options: `book')
diff "$(kpsewhich article.cls)" "$(kpsewhich report.cls)" | grep -c '^[<>]' # 232
diff "$(kpsewhich report.cls)" "$(kpsewhich book.cls)" | grep -c '^[<>]' # 67Which classes have \chapter, and what else the answer changes
Only report and book have \chapter; article does not. Write \chapter{...} in an article and the error does not say “this class has no chapters” — it says ! Undefined control sequence., because to LaTeX an absent command and a typo are the same event. The more consequential point is that this single difference changes numbering in four places at once. report.cls and book.cls declare \newcounter{section}[chapter], so section numbers reset at every chapter and take the form 2.1. Figures, tables, equations and footnotes reset per chapter too (\@addtoreset{equation}{chapter} and friends). And the default secnumdepth is 3 in article but 2 in report and book.
Set the same body in both classes and the secnumdepth difference is immediately visible. Give each one a \section, a \subsection and a \subsubsection: article prints “1 / 1.1 / 1.1.1”, numbering all three, while report prints “0.1 / 0.1.1 / (no number)”. In report and book, \subsubsection is unnumbered by default — that is almost always the cause of “my subsubsections have no numbers”, and \setcounter{secnumdepth}{3} in the preamble fixes it. The “0.1” is worth noticing too. Start a report or book with \section and no preceding \chapter, and the chapter counter sits at zero, so your sections come out as 0.1, 0.2. If your document has no chapters, that is the class telling you it should have been an article.
% same body, two classes: article numbers three levels, report only two
\documentclass{article} % -> 1 Sec / 1.1 Sub / 1.1.1 Subsub
%\documentclass{report} % -> 0.1 Sec / 0.1.1 Sub / Subsub (unnumbered)
\begin{document}
\section{Sec}\subsection{Sub}\subsubsection{Subsub}
\end{document}
% in report/book, restore the third level with:
% \setcounter{secnumdepth}{3}While we are here, one widely believed claim is simply false. \part does not reset the chapter counter. Both report.cls and book.cls say only \newcounter{chapter}, with no optional argument tying it to part. Put two chapters in Part I and start Part II, and the next chapter is numbered 3, not 1 — in both classes alike. If you want numbering to restart per part, you have to declare it yourself, for example with \counterwithin{chapter}{part} in the preamble. The appearance of \part does differ by class: in article it is a heading inside the running text, while in report and book it breaks the page and becomes a page of its own, centred and set large.
report vs book: the same source, 5 pages or 9
The fork between the two classes is a single line of defaults. report.cls says \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany}; book.cls says ...,twoside,onecolumn,final,openright}. Everything else follows from that. openright makes chapters start on a right-hand (odd) page, inserting a blank verso whenever needed. Set the same source — two parts, three chapters — in each and report produces 5 pages while book produces 9. Several of the extra four are entirely blank. That is correct behaviour for something printed and bound, and pure nuisance for a PDF read on screen. Hence the combination people actually use in practice: choose book, then say oneside explicitly.
The diff holds a stranger item too. book has no abstract environment. article and report both define one; book.cls omits the entire block and never defines \abstractname. Move a manuscript that compiled as a report over to book and it stops with ! LaTeX Error: Environment abstract undefined. — an editorial judgement (books do not carry abstracts) frozen into the class file. The default page style differs as well: report uses plain (a page number, centred at the foot) and book uses headings (running heads carrying chapter and section titles). And book loads its own layout file, bk10.clo. Compared with the size10.clo used by article and report, the text block narrows from 345pt to 4.5in (about 325pt), the height drops from 43 lines to 41, and the margins turn asymmetric — 0.5in on the spine side, 1.5in on the outer edge. Moving from report to book changes not only the imposition but the box the text sits in.
| Class | \chapter | Defaults | Default page style | Layout file |
|---|---|---|---|---|
article | None; top level is \section | oneside, notitlepage, secnumdepth=3 | plain | size10.clo |
report | Yes | oneside, openany, titlepage, secnumdepth=2 | plain | size10.clo |
book | Yes; unnumbered inside \frontmatter | twoside, openright, titlepage, secnumdepth=2 | headings | bk10.clo (different layout) |
letter | None; the letter environment is the unit | oneside, letterpaper, 10pt | firstpage / plain | size10.clo |
slides | None; the slide environment is the unit | letterpaper, final | Its own | sfonts.def / slides.def |
What \frontmatter, \mainmatter and \backmatter actually switch
These three belong to book alone, and each does two things at once. \frontmatter switches page numbers to roman (i, ii, …) and simultaneously sets \if@mainmatter false, which stops chapters from being numbered. \mainmatter returns to arabic numerals starting again at 1 and brings chapter numbers back. \backmatter leaves the page numbering alone and only turns chapter numbers off again. That second effect is the one that pays off: unnumbered front-matter chapters still appear in the table of contents, so the familiar workaround of \chapter* plus a hand-written \addcontentsline is unnecessary in book. Compile one and the .toc file shows \contentsline {chapter}{Preface}{i} with no number beside the numbered \numberline {1} entries of the main matter.
\documentclass[11pt,a4paper]{book}
\begin{document}
\frontmatter % roman page numbers, chapters unnumbered
\chapter{Preface} % -> toc: \contentsline {chapter}{Preface}{i}
\tableofcontents
\mainmatter % arabic, restarts at 1, chapters numbered again
\chapter{Beginning} % -> toc: ... {\numberline {1}Beginning}{1}
\section{Apparatus} % numbered 1.1
\backmatter % page numbers continue, chapters unnumbered
\chapter{Index}
\end{document}The \documentclass options, and which defaults differ per class
Every standard class except slides accepts a shared set of options inside the brackets of \documentclass[...]{...}. Most are document-wide switches, but the point that matters is that the same option name has different defaults in different classes. That is what the “Defaults” column of the table above records; each value is written out literally on the class file's \ExecuteOptions{...} line.
10pt/11pt/12pt— base body font size. All three classes default to10pt.- Paper size —
letterpaper(the default),a4paper,a5paper,b5paper,legalpaper,executivepaper. Because the default is US Letter, anyone in A4 territory writesa4paperevery time. twoside/oneside— two- or one-sided layout. Onlybookdefaults totwoside.openright/openany— whether chapters open on a right-hand page or any page.bookusesopenright,reportopenany.articledoes not declare either one — writing it is not an error; it merely sinks into the log asLaTeX Warning: Unused global option(s):(the reason for that asymmetry is covered in “Class options & authoring”).titlepage/notitlepage— whether the title gets its own page.reportandbookusetitlepage,articlenotitlepage.twocolumn/onecolumn— set the body in two columns or one. All three default toonecolumn.fleqn— flush displayed formulas left (default is centred).leqno— put equation numbers on the left (default is the right). Both are implemented by loading a.clofile.landscape— landscape orientation.draft— mark overfull boxes with a black rule (the default isfinal).openbib— set the bibliography in an “open” format.
The letter class: an entirely different command set
letter is not a blood relative of the other three. It comes from its own source rather than classes.dtx, and in place of \section, \maketitle and a title page it carries a vocabulary for correspondence. Sender details — \address{...} (your own address), \signature{...}, \name{...}, \location{...}, \telephone{...} — go in the preamble and are shared by every letter in the file. One letter is one letter environment, whose argument is the recipient's address. The body opens with \opening{...} and closes with \closing{...}, optionally followed by \cc{...} for carbon copies, \encl{...} for enclosures and \ps for a postscript. Line breaks inside an address are \\.
\documentclass{letter}
\address{1 Computing Way \\ London} % sender, shared by every letter
\signature{Ada Lovelace}
\makelabels % appends a sheet of mailing labels
\begin{document}
\begin{letter}{Charles Babbage \\ 2 Engine Road} % recipient = argument
\opening{Dear Mr.\ Babbage,}
Thank you for the notes on the Analytical Engine.
\closing{Yours sincerely,}
\cc{The Royal Society}
\encl{Two diagrams}
\end{letter}
\begin{letter}{Mary Somerville \\ 3 Science Lane}
\opening{Dear Mrs.\ Somerville,}
A second letter, same sender, same file.
\closing{Yours sincerely,}
\end{letter}
\end{document}One line tells you exactly which era this class was designed for. Put \makelabels in the preamble and the PDF gains a final page of mailing labels. Compile the example above and you get two pages of letters followed by a label sheet holding both recipient addresses — three pages in all. Print it onto label stock, peel, stick on the envelopes. That was daily work once. The flip side is that letter is genuinely good at a mail-merge of one sender to many recipients: line up as many letter environments as you have addressees. When the format requirements get specific — DIN 5008 in German-speaking countries, for instance — move to a dedicated class such as KOMA-Script's scrlttr2 instead.
What the slides class was: presentations before beamer
The fifth standard class, slides, is still in TeX Live (v2.4b in the 2024 release, last touched in 2022). It is not, however, an old beamer. LaTeX's own shipped manifest.txt describes slides.dtx as “Slides class, etc based on SLiTeX”, and that is exactly what it is: the descendant of SLiTeX, the once-separate program for making overhead-projector transparencies with TeX. Which is why its vocabulary is different. A slide environment is one sheet, a note environment is the speaker's note, and an overlay environment was literally a second transparency laid on top of the first. Compile one and the numbering says so: the slide is “1”, the overlay laid over it is “1-a”, and its note is “1-1”. \onlyslides{...} and \onlynotes{...} let you print just the slides or just the notes from one source.
The practical verdict is simple: for new slides use beamer, not slides. The old class has no themes, no stepwise overlays in the modern sense, and no PDF navigation; it was designed with print, not a projector driver, as its output. slides is worth reading only when you inherit an old manuscript, or when you want to see where beamer's treatment of a frame as “one logical screen” came from.
How to choose: work backward from the requirement
Choosing a class is not a matter of taste; work backward from what you have to hand in. No chapters needed, article; a chaptered technical report, report; a bound manuscript that has to work as a spread, book; correspondence, letter. If a template has been supplied, its class has already fixed the structure, the margins and the handling of the title — do not switch it back to a standard class.
- PDF read on screen only — say
onesideexplicitly. Even withbook,\documentclass[oneside]{book}removes the blank pages. - Printed and bound — choose
twosideandopenrightdeliberately, and check the inner margin for binding. - You want real control over the page — the standard classes give you few handles; move to KOMA-Script (
scrartcl/scrreprt/scrbook) or memoir. - Mainly Japanese text — the standard classes were not designed for Japanese typesetting. Start from jsclasses (
jsarticle/jsbook) on pLaTeX / upLaTeX, ltjsclasses on LuaLaTeX, or the newer jlreq. - Slides — beamer, not
slides.
What to check after changing class mid-document
Rewriting one word in \documentclass is not a cosmetic change but a structural one. As we have seen, it moves the availability of chapters, the depth of numbering, the existence of abstract, the dimensions of the text block and the insertion of blank pages, all at once. After switching, do not take a clean compile as proof: check these five things with your eyes.
| Check | What happens | Fix |
|---|---|---|
\chapter | Moving to article stops with ! Undefined control sequence. | Demote chapters to \section, or stay on report / book |
abstract | Moving to book gives ! LaTeX Error: Environment abstract undefined. | Drop the abstract, or replace it with something like \chapter*{Abstract} |
secnumdepth | Coming from article, \subsubsection numbers disappear | Add \setcounter{secnumdepth}{3} |
openright | On book, blank versos appear before chapters and the page count grows | oneside for screen; leave it for print |
titlepage | \maketitle gains or loses a page of its own | Set titlepage or notitlepage explicitly |