Skip to main content
To typeset a book in LaTeX, choose a book class (book, memoir, or scrbook), configure the trim size and asymmetric inner/outer margins with geometry, divide the manuscript with \frontmatter, \mainmatter, and \backmatter, and check that every font is embedded in the final PDF before sending it to a printer.

Step 1: Choose a book document class

All three standard book classes are included in TeX Live 2026 and support \frontmatter, \mainmatter, \backmatter, \part, and \chapter: By default, book loads letterpaper, 10pt, twoside, onecolumn, final, and openright (chapters start on right-hand odd pages, inserting a blank left page when needed). Pass openany if you want chapters to start on the next available page instead.

Step 2: Set trim size, margins, and binding offset

Books are rarely printed on standard Letter or A4 paper. Set the exact trim size with geometry (paperwidth and paperheight, such as 6in by 9in for US trade paperbacks) and use inner, outer, top, bottom, and bindingoffset so the spine margin accommodates the binding:
  • inner sets the margin next to the spine; outer sets the margin on the thumb edge.
  • bindingoffset adds extra space to the inner margin on both left-hand and right-hand pages under twoside.
  • For a detailed breakdown of oneside vs. twoside, openright vs. openany, and odd/even headers, see Single-sided vs. double-sided documents.

Step 3: Structure front matter, main matter, and back matter

In book.cls, three division switches control page numbering and chapter numbers:
  • \frontmatter: Runs \cleardoublepage, turns off chapter numbers (chapters still appear in \tableofcontents), and switches page numbers to lowercase Roman numerals (i, ii, iii). Use it for title pages, copyright, dedication, contents, and preface.
  • \mainmatter: Runs \cleardoublepage, turns chapter numbers back on, and resets page numbering to Arabic 1.
  • \backmatter: Starts a new page (\cleardoublepage under openright, \clearpage under openany), turns off chapter numbers while keeping entries in the table of contents, and lets Arabic page numbering continue without resetting.
The five-page compiled example below demonstrates geometry trim sizing (105mm × 148mm with inner=15mm and outer=10mm) together with all three book divisions:
book.tex
Test this example live in your browser. Open a ready-to-compile LaTeX project with TeX Live 2026 preinstalled and zero local setup.Open starter article
For a full-length book, keep each chapter in its own file and load them with \include from main.tex; see Managing large documents. To add a back-of-book index or glossary, see Indexes and Glossaries.

Step 4: Check fonts and printer specifications

Before uploading a PDF to a print-on-demand service or publisher, verify that every font is embedded as a vector outline. On Linux, macOS, or Windows (with Poppler installed), run pdffonts:
The output lists name, type, encoding, emb, sub, uni, and object ID for every font in the document:
  • Confirm that every row shows yes under emb (embedded).
  • Confirm that no font has Type 3 in the type column—Type 3 indicates a bitmap font that looks jagged in print. Loading \usepackage[T1]{fontenc} alongside a vector font package such as lmodern or tgpagella (or compiling with XeLaTeX/LuaLaTeX and fontspec) prevents bitmap fallback.
Every printer and distributor sets its own production rules for trim sizes, bleed (when artwork reaches the page edge), minimum inner gutter width by page count, color space (CMYK vs. RGB), and PDF/X profile. Check your printer’s specification before finalizing margins and artwork rather than relying on generic defaults. If you also need an HTML or Word version for e-book conversion, see Export LaTeX to Word and HTML.

Start from the Book template

The Book template below is a 6 × 9 inch trade format using book, tgpagella, geometry, and fancyhdr, with title and copyright pages, dedication, contents, preface, two parts with chapters, footnotes, and back matter. Open it directly in LaTeX Cloud Studio (which compiles on TeX Live 2026) or inspect its full source code below.

Book template source code

book.tex