Documentation Index Fetch the complete documentation index at: https://resources.latex-cloud-studio.com/llms.txt
Use this file to discover all available pages before exploring further.
The \documentclass command tells LaTeX what kind of document you are writing. It controls the available structure, the default layout, and options such as font size, paper size, and one-sided or two-sided output.
Quick answer : use article for papers and assignments, report for reports and shorter theses, book for books and long dissertations, beamer for slides, and letter for formal letters.Basic syntax :\documentclass [ 12pt,a4paper ]{ article }
Best next read : Page numbering for long documents and Multiple columns for journal-style layouts.
Which LaTeX Document Class Should You Use?
If you only need the short version:
If you are writing… Use this class Essay, assignment, journal paper articleLab report, project report, shorter thesis reportBook, dissertation, long manual bookSlides or a presentation deck beamerFormal letter letter
The \documentclass Command
This is the basic syntax:
\documentclass [ options ]{ class }
class is the document class such as article, report, or book
options are optional settings such as font size, paper size, or one-sided vs two-sided layout
\documentclass [ 12pt,a4paper,twoside ]{ report }
Report Title
12pt body text on A4 paper | two-sided layout
Chapter 1 Introduction
The selected document class determines the page size, available structure, and default typography before the rest of the document is processed.
Which Document Class Should You Use?
Class Best for Key difference articleEssays, homework, journal papers No \chapter command reportTechnical reports, shorter theses, project docs Supports chapters bookBooks, dissertations, long manuals Adds front matter and two-sided book layout beamerSlides and presentations Uses frames instead of pages letterFormal letters Purpose-built letter structure
Standard Document Classes
article
For short documents without chapters.
\documentclass [ options ]{ article }
% Best for:
% - Research papers
% - Journal articles
% - Reports (short)
% - Homework assignments
% - Essays
% Structure hierarchy:
% \section{}
% \subsection{}
% \subsubsection{}
% \paragraph{}
% \subparagraph{}
\begin { document }
\title {Article Title}
\author {Author Name}
\date { \today }
\maketitle
\begin { abstract }
Abstract content for articles.
\end { abstract }
\section { Introduction }
Article content starts here.
\section { Main Content }
More sections as needed.
\section { Conclusion }
Final thoughts.
\end { document }
Article Title
Author Name
April 2026
Abstract. Abstract content for articles.
1 Introduction
Article content starts here with section-based structure and no chapter heading.
2 Main Content
Short papers and assignments usually fit naturally into this layout.
Article Features:
No \chapter command
Abstract environment available
Compact formatting
Good for papers under 20-30 pages
report
For longer documents with chapters.
\documentclass [ options ]{ report }
% Best for:
% - Technical reports
% - Theses (shorter)
% - Project documentation
% - Lab reports
% - User manuals
% Structure hierarchy:
% \chapter{}
% \section{}
% \subsection{}
% \subsubsection{}
% \paragraph{}
% \subparagraph{}
\begin { document }
\title {Report Title}
\author {Author Name}
\date { \today }
\maketitle
\begin { abstract }
Abstract for reports.
\end { abstract }
\tableofcontents
\chapter { Introduction }
First chapter content.
\chapter { Methodology }
Second chapter content.
\chapter { Results }
Third chapter content.
\chapter { Conclusion }
Final chapter content.
\end { document }
Report Title
Author Name
Title page followed by a table of contents
Contents
1 Introduction
2 Methodology
3 Results
Chapter 1 Introduction
Reports add chapter-level structure for longer documents.
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.
\documentclass [ options ]{ book }
% Best for:
% - Books
% - Long theses/dissertations
% - Textbooks
% - Multi-volume works
% - Complex documents
% Structure hierarchy:
% \part{}
% \chapter{}
% \section{}
% \subsection{}
% \subsubsection{}
% \paragraph{}
% \subparagraph{}
\begin { document }
\frontmatter % Roman page numbers, no chapter numbers
\title {Book Title}
\author {Author Name}
\date { \today }
\maketitle
\tableofcontents
\listoffigures
\listoftables
\mainmatter % Arabic page numbers, normal numbering
\part { First Part }
\chapter { Introduction }
Chapter content begins here.
\chapter { Background }
More content here.
\backmatter % No chapter numbers
\appendix
\chapter { Additional Information }
\bibliographystyle {plain}
\bibliography {references}
\end { document }
Book Title
Author Name
Front matter in Roman numerals | main matter in Arabic numerals
Part I
Chapter 1 Introduction
Books use chapters, parts, and dedicated front and back matter for long-form work.
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.
\documentclass [ options ]{ beamer }
% Best for:
% - Conference presentations
% - Lecture slides
% - Academic talks
% - Business presentations
% Slide structure:
% \frame{} or \begin{frame}...\end{frame}
% \section{} for navigation
% \subsection{} for organization
\usetheme {Warsaw} % Choose theme
\usecolortheme {dolphin} % Choose colors
\title {Presentation Title}
\author {Author Name}
\institute {Institution}
\date { \today }
\begin { document }
\frame { \titlepage }
\begin { frame }
\frametitle { Outline }
\tableofcontents
\end { frame }
\section { Introduction }
\begin { frame }
\frametitle { Introduction }
\begin { itemize }
\item First point
\item Second point
\item <2-> This appears on second click
\end { itemize }
\end { frame }
\section { Main Content }
\begin { frame }
\frametitle { Main Points }
Content of the slide here.
\end { frame }
\end { document }
Presentation Title
Introduction
First point Second point Overlay item appears on the next click
Beamer Features:
Built-in themes and color schemes
Overlay specifications for animations
Navigation aids
PDF presentation format
letter
For correspondence.
\documentclass [ options ]{ letter }
% Best for:
% - Business letters
% - Formal correspondence
% - Cover letters
% - Official documents
\usepackage [ utf8 ]{ inputenc }
\signature {Your Name}
\address {Your Address \\ City, State ZIP}
\begin { document }
\begin { letter }{Recipient Name \\ Recipient Address \\ City, State ZIP}
\opening {Dear Sir or Madam,}
Body of the letter goes here. Multiple paragraphs
are separated by blank lines.
This is the second paragraph of the letter.
\closing {Sincerely,}
\ps {P.S. Additional note here.}
\encl {Enclosure list}
\end { letter }
\end { document }
Your Address City, State ZIP
March 27, 2026
Dear Sir or Madam,
Body of the letter goes here. Multiple paragraphs are separated by blank lines.
Sincerely,
Your Name
Letter Features:
Automatic formatting for addresses
Date insertion
Signature placement
Standard letter conventions
Document Class Options
Font Size Options
% Available font sizes
\documentclass [ 10pt ]{ article } % 10pt (default)
\documentclass [ 11pt ]{ article } % 11pt
\documentclass [ 12pt ]{ article } % 12pt
% Font size affects:
% - Body text size
% - Section heading sizes
% - Math formula sizes
% - Footnote sizes
10pt
This is the default article text size.
11pt
This size gives slightly more breathing room for body text.
12pt
This version is more spacious and is common in reports and theses.
Paper Size Options
% US paper sizes
\documentclass [ letterpaper ]{ article } % 8.5 × 11 inches (default)
\documentclass [ legalpaper ]{ article } % 8.5 × 14 inches
\documentclass [ executivepaper ]{ article } % 7.25 × 10.5 inches
% International paper sizes
\documentclass [ a4paper ]{ article } % 210 × 297 mm
\documentclass [ a5paper ]{ article } % 148 × 210 mm
\documentclass [ b5paper ]{ article } % 176 × 250 mm
% Custom paper size (with geometry package)
\usepackage [ paperwidth=8in,paperheight=10in ]{ geometry }
letterpaper 8.5 × 11 in legalpaper 8.5 × 14 in a4paper 210 × 297 mm a5paper 148 × 210 mm
Layout Options
% Page orientation
\documentclass [ landscape ]{ article } % Landscape orientation
\documentclass [ portrait ]{ article } % Portrait (default)
% Columns
\documentclass [ onecolumn ]{ article } % Single column (default)
\documentclass [ twocolumn ]{ article } % Two columns
% Sides
\documentclass [ oneside ]{ article } % Single-sided (default for article)
\documentclass [ twoside ]{ book } % Double-sided (default for book)
% Draft mode
\documentclass [ draft ]{ article } % Shows overfull boxes, faster compilation
\documentclass [ final ]{ article } % Final mode (default)
One column Single wide text block for standard articles.
Two column Narrower columns for paper-style layouts and proceedings.
Title Page Options
% Title page behavior
\documentclass [ titlepage ]{ article } % Separate title page
\documentclass [ notitlepage ]{ report } % Title on first page
% Abstract behavior (for article)
\documentclass [ onecolumn ]{ article } % Abstract spans full width
\documentclass [ twocolumn ]{ article } % Abstract spans both columns
Document Title
Separate title page enabled
With titlepage , the title sits on its own page before the document body starts.
Equation Options
% Equation numbering
\documentclass [ leqno ]{ article } % Equation numbers on left
\documentclass [ reqno ]{ article } % Equation numbers on right (default)
% Equation formatting
\documentclass [ fleqn ]{ article } % Left-aligned equations
% Default: centered equations
(1) E = mc²
a² + b² = c² (2)
Bibliography Options
% Bibliography formatting
\documentclass [ openbib ]{ article } % Open bibliography format
% Default: closed bibliography format
References
[1] D. Knuth. The TeXbook. Addison-Wesley, 1984.
[2] L. Lamport. LaTeX: A Document Preparation System. Addison-Wesley, 1994.
Custom Document Classes
Creating Custom Classes
custom-class.cls
using-custom-class.tex
% File: myclass.cls
\NeedsTeXFormat {LaTeX2e}
\ProvidesClass {myclass}[2024/01/01 My Custom Class]
% Based on article class
\LoadClass [11pt,a4paper]{article}
% Required packages
\RequirePackage {geometry}
\RequirePackage {fancyhdr}
\RequirePackage {graphicx}
% Page layout
\geometry {margin=1in}
% Custom commands
\newcommand { \institution }[1]{ \def\@institution {#1}}
\newcommand { \course }[1]{ \def\@course {#1}}
% Custom title format
\renewcommand { \maketitle }{
\begin { center }
{\LARGE\bfseries\@title} \\ [1em]
{\large\@author} \\
{\large\@institution} \\
{\large\@course} \\
{\large\@date}
\end { center }
}
Assignment Title
Student Name
University Name
Course Code
Custom classes make repeated institutional formatting automatic.
Academic Document Classes
Thesis Classes
% University-specific thesis classes
\documentclass { phdthesis } % PhD thesis
\documentclass { msthesis } % Master's thesis
\documentclass { ucthesis } % UC system thesis
% Generic thesis classes
\documentclass [ thesis ]{ memoir }
\documentclass { scrbook } % KOMA-Script book class
% Configuration example
\documentclass [ 12pt,oneside,openright ]{ report }
\usepackage [ margin=1.5in,left=2in ]{ geometry }
\usepackage { setspace }
\doublespacing
Dissertation Title
A Thesis Submitted to the Graduate Faculty
University Name | Department Name
Thesis layouts usually use wider margins, double spacing, and stricter front-matter requirements.
Journal Classes
% IEEE papers
\documentclass { IEEEtran }
% ACM papers
\documentclass { acmart }
% Springer papers
\documentclass { llncs } % Lecture Notes in Computer Science
\documentclass { svjour3 } % Springer journals
% Elsevier papers
\documentclass { elsarticle }
% AMS papers
\documentclass { amsart }
Journal Manuscript Title
Structured abstract, compact margins, and two-column typesetting are common in journal templates.
Specialized classes such as IEEEtran , acmart , and elsarticle impose publisher-specific typography and metadata requirements.
The compiled PDF usually includes a title block, affiliation lines, and a tuned bibliography style that standard classes do not reproduce by default.
KOMA-Script Classes
Alternative to standard classes with enhanced features:
% KOMA-Script equivalents
\documentclass { scrartcl } % Instead of article
\documentclass { scrreprt } % Instead of report
\documentclass { scrbook } % Instead of book
\documentclass { scrlttr2 } % Instead of letter
% Enhanced features
\documentclass [
fontsize=11pt,
paper=a4,
twoside=false,
titlepage=false,
headings=small
]{ scrartcl }
% KOMA options
\KOMAoptions {
DIV=12, % Text area calculation
BCOR=8mm, % Binding correction
headinclude=true, % Include header in text area
footinclude=false % Exclude footer from text area
}
KOMA-Script Article
Balanced margins, tuned heading sizes, and configurable type area
Introduction
KOMA-Script classes are often chosen when you want better European defaults and more layout controls without building a custom class from scratch.
Memoir Class
Highly customizable class for books and articles:
\documentclass [ 11pt,a4paper,oneside ]{ memoir }
% Page layout
\settrimmedsize {297mm}{210mm}{*} % A4 paper
\setlength { \trimtop }{0pt}
\setlength { \trimedge }{ \stockwidth }
\addtolength { \trimedge }{- \paperwidth }
\settypeblocksize {634pt}{448.13pt}{*}
\setulmargins {4cm}{*}{*}
\setlrmargins {2.5cm}{*}{*}
\checkandfixthelayout
% Chapter styles
\chapterstyle {veelo} % Pre-defined style
% or create custom style
\makechapterstyle {custom}{
\renewcommand { \chapternamenum }{}
\renewcommand { \printchaptername }{}
\renewcommand { \printchapternum }{ \chapnumfont\thechapter\space }
\renewcommand { \afterchapternum }{}
}
Chapter opener
1 Introduction
Memoir combines layout control, chapter styling, and book-structure tools in one class for long, highly customized documents.
Document Class Comparison
When to Use Each Class
article
report
book
beamer
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
Best for:
Technical reports (20-100 pages)
Master’s theses
Project documentation
Lab reports
User manuals
Features:
Chapter support
Title page by default
Abstract support
Good for structured documents
Best for:
Books (100+ pages)
PhD dissertations
Textbooks
Reference manuals
Multi-volume works
Features:
Two-sided by default
Front/main/back matter
Parts and chapters
Professional typography
Best for:
Academic presentations
Conference talks
Lecture slides
Business presentations
Features:
Frame-based content
Themes and animations
Navigation tools
PDF output optimized for projection
Best Practices
Document class selection tips:
Start with standard classes - They’re well-tested and widely supported
Consider document length - Article for short, report for medium, book for long
Check submission requirements - Journals often require specific classes
Use options wisely - Don’t override default typography without good reason
Test compilation early - Ensure your chosen class works with your packages
Read class documentation - Each class has specific features and commands
Quick Reference
Standard Classes Summary
Class Purpose Length Chapters Default Layout articlePapers, reports Short No One-sided reportTechnical reports Medium Yes One-sided bookBooks, theses Long Yes Two-sided beamerPresentations N/A No Slides letterCorrespondence Short No Letter format
Common Options Summary
Option Effect Classes 10pt, 11pt, 12ptFont size All a4paper, letterpaperPaper size All (except beamer) oneside, twosidePage layout All (except beamer) onecolumn, twocolumnColumn layout article, report titlepage, notitlepageTitle page article, report draft, finalDraft mode All
Practice in LaTeX Cloud Studio
Open a project and choose a class Start with article, report, or beamer in the browser editor and compile early to confirm the structure.
Templates that match the class Use a working template when you want the document class and layout decisions already in place.