LaTeX
01 / 02

Document Structure, Math & Packages

LaTeX: Document Structure, Math & Packages

LaTeX is a typesetting system built on TeX -- documents are plain-text markup describing structure/meaning (WYSIWYM: What You See Is What You Mean), compiled into precisely formatted output. Dominant in academic/technical writing for its math typesetting, cross-referencing, and bibliography handling.

Minimal Document

\documentclass{article}
\usepackage{amsmath}    % advanced math typesetting
\usepackage{graphicx}   % \includegraphics
\usepackage{hyperref}   % clickable links in the output PDF

\title{My Paper}
\author{Jane Doe}

\begin{document}
\maketitle

\section{Introduction}
\label{sec:intro}

This references Section~\ref{sec:intro} automatically -- the
number stays correct even if sections get reordered or inserted,
no manual renumbering needed.

\begin{itemize}
  \item First point
  \item Second point
\end{itemize}

\end{document}

Mathematical Notation

% Inline math
Einstein's equation is $E = mc^2$.

% Display math -- one of LaTeX's strongest, most-cited use cases
\begin{equation}
  \frac{d}{dx}\int_a^x f(t)\,dt = f(x)
\end{equation}

% Custom macro for a frequently-used symbol -- change the
% definition once, every use updates
\newcommand{\R}{\mathbb{R}}

Let $x \in \R$ be arbitrary.

Figures & Images

\begin{figure}[htbp]
  \centering
  \includegraphics[width=0.6\textwidth]{diagram.png}
  \caption{System architecture overview.}
  \label{fig:architecture}
\end{figure}

% [htbp] hints where LaTeX may FLOAT this figure (top/bottom of
% page) to avoid an awkward page break -- not pinned to the exact
% source location, a deliberate trade-off for better auto layout.

See Figure~\ref{fig:architecture} for details.

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free