Skip to main content
The \documentclass command selects the structure and default layout for a LaTeX document. Use article for papers without chapters, report for chapter-based reports or shorter theses, book for long two-sided works, and beamer for presentation slides.
Quick answer: choose by structure, not only by page count. If the document needs \chapter, start with report or book; article does not define that command.Basic syntax:
example.tex
Common default: when no publisher or university provides a required class, article is the safest starting point for an essay, assignment, or research paper.

The \documentclass Command

This is the basic syntax:
source-1.tex
source-2.tex

article vs report vs book vs beamer

If a journal, conference, or university supplies a .cls file or official template, use that required class instead of converting the document to a standard class.

Standard Document Classes

article

For short documents without chapters.
article-class.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
Article Features:
  • No \chapter command
  • Abstract environment available
  • Compact formatting
  • Good for papers under 20-30 pages

report

For longer documents with chapters.
report-class.tex
Report Features:
  • \chapter command available
  • Abstract environment included
  • Separate title page by default
  • Good for documents 20-100 pages

book

For books and very long documents.
book-class.tex
Book Features:
  • Two-sided layout by default
  • Front matter, main matter, back matter
  • Parts and chapters available
  • Best for 100+ page documents

beamer

For presentations and slides.
beamer-class.tex
Beamer Features:
  • Built-in themes and color schemes
  • Overlay specifications for animations
  • Navigation aids
  • PDF presentation format

letter

For correspondence.
letter-class.tex
Letter Features:
  • Automatic formatting for addresses
  • Date insertion
  • Signature placement
  • Standard letter conventions

Document Class Options

Font Size Options

font-size-options.tex

Paper Size Options

paper-size-options.tex

Layout Options

layout-options.tex

Title Page Options

title-options.tex

Equation Options

equation-options.tex

Bibliography Options

bibliography-options.tex

Custom Document Classes

Creating Custom Classes

myclass.cls
using-custom-class.tex

Academic Document Classes

Thesis Classes

thesis-classes.tex

Journal Classes

journal-classes.tex

KOMA-Script Classes

Alternative to standard classes with enhanced features:
koma-script.tex

Memoir Class

Highly customizable class for books and articles:
memoir-class.tex

Document Class Comparison

When to Use Each Class

Best for:
  • Research papers (5-30 pages)
  • Journal submissions
  • Conference papers
  • Technical reports
  • Essays and assignments
Features:
  • No chapters
  • Compact layout
  • Abstract support
  • Bibliography integration

Common \documentclass Errors

Do not rename a missing custom .cls file to article.cls or replace it silently. Publisher and university classes often contain required formatting and metadata rules.

Best Practices

Document class selection tips:
  1. Follow submission requirements first — an official class overrides a general recommendation.
  2. Choose the required structure — chapter support and front matter matter more than a rough page count.
  3. Set regional defaults explicitly — declare paper size and any required one- or two-sided layout.
  4. Keep class options intentional — unsupported options are ignored and usually produce a warning.
  5. Compile early with the real template — class/package conflicts are easier to fix before the document grows.
  6. Review the class documentation — custom classes can redefine commands and defaults.

Quick Reference

Standard Classes Summary

Common Options Summary

Practice in LaTeX Cloud Studio


Next: Learn about LaTeX Packages to extend document functionality, or explore Document Structure for hands-on examples.