Contents

LaTeX Document Structure

This article discusses LaTeX document structure for letter, article, report, and book document classes.


LaTeX is a markup-based typesetting system widely used for writing scientific works, reports, books, and theses.
One popular platform for writing and composing LaTeX documents is Overleaf, an online editor that enables real-time collaboration and provides complete documentation and templates.

Before starting document writing, it’s important to understand the basic structure of LaTeX documents.
A .tex file generally consists of three main parts:

  1. Preamble – initial document settings before \begin{document}
  2. Body – main document content between \begin{document} and \end{document}
  3. Additional sections – such as appendices, bibliography, or index

The minimal structure of a LaTeX document is as follows:

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Document Title}
\author{Author Name}
\date{\today}

\begin{document}

\maketitle
\section{Introduction}
Your introduction text here.

\end{document}

Overleaf explains that every LaTeX document must begin with a \documentclass{} declaration and end with \end{document}.


The preamble contains all initial settings before the document begins. It typically includes:

\documentclass[12pt, a4paper]{article}

The document class determines the type and general style of the document.
Some standard classes:

Class Description
article For articles, short reports, or papers
report For long reports, final projects, or dissertations
book For books with chapters
letter For formal letters

Packages extend LaTeX’s capabilities.
Common examples:

\usepackage[utf8]{inputenc}   % Set text encoding
\usepackage[T1]{fontenc}      % Set font encoding
\usepackage{graphicx}         % Insert images
\usepackage{amsmath, amssymb} % Mathematical symbols and formulas

Metadata contains information such as title, author, and date.

\title{LaTeX Document Example}
\author{Author Name}
\date{\today} % or can be left empty with {}

This metadata is used when the \maketitle command is called in the document body.


This section contains the main content between \begin{document} and \end{document}.

Example basic structure:

\begin{document}

\maketitle

\section{Introduction}
Opening or introductory section of the topic.

\section{Methodology}
Explaining research methods or steps.

\subsection{Steps}
More detailed explanation of the method.

\section{Conclusion}
Final conclusion of the discussion.

\end{document}

LaTeX automatically numbers sections (\section, \subsection, etc.).
For unnumbered sections, use an asterisk:

\section*{Acknowledgments}

Use the graphicx package:

\usepackage{graphicx}

\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{image.png}
\caption{Example Image}
\label{fig:example}
\end{figure}

Use the amsmath package:

\begin{equation}
E = mc^2
\end{equation}

For academic documents or books, LaTeX provides additional divisions such as:

\frontmatter    % For front matter (abstract, table of contents)
\tableofcontents

\mainmatter     % Main content (chapters, subchapters)
\chapter{Introduction}

\backmatter     % Back matter (bibliography, appendices)
\appendix
\chapter{Appendix}

Use biblatex for automatic bibliography:

\usepackage{biblatex}
\addbibresource{bibliography.bib}

...

\printbibliography

Here’s an example of the simplest valid document:

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Hello World in LaTeX}
\author{Author}
\date{}

\begin{document}

\maketitle

\section{Introduction}
This is a minimal document example in LaTeX.

\end{document}

  • Use separate folder structure (/images, /chapters, /bib) to make large documents easier to manage.
  • Separate each chapter into .tex files and call them with \input{} or \include{}.
  • Use the Overleaf Outline Panel to quickly view document structure.
  • Avoid loading excessive unnecessary packages to maintain compilation performance.

The basic structure of LaTeX documents is highly organized and modular.
By understanding the division between preamble, body, and additional sections, writers can manage technical documents more efficiently.

Overleaf provides complete guides, practical examples, and templates that make it easier for new users to learn and write professional documents.


  1. Learn LaTeX in 30 Minutes – Overleaf
  2. Sections and Chapters – Overleaf
  3. How to Write a Thesis in LaTeX (Part 1): Basic Structure – Overleaf
  4. Inserting Images – Overleaf
  5. Bibliography Management with BibLaTeX – Overleaf
  6. Using the File Outline in Overleaf