Learn LaTeX
LaTeX is the gold standard for academic and scientific document preparation. This guide will take you from complete beginner to confident LaTeX user.
What is LaTeX?
LaTeX (pronounced "LAY-tek" or "LAH-tek") is a document preparation system widely used in academia, especially for scientific and technical documents. Unlike word processors like Microsoft Word, LaTeX separates content from formatting, allowing you to focus on what you're writing while the system handles how it looks.
Why Use LaTeX?
- Beautiful Typography – LaTeX produces professionally typeset documents with superior handling of mathematical equations, tables, and figures.
- Consistency – Document styling is consistent throughout, managed by templates and style files.
- Cross-references – Automatic numbering of sections, figures, tables, and equations with easy cross-referencing.
- Bibliography Management – Seamless integration with BibTeX for managing citations and references.
- Version Control Friendly – Plain text files work perfectly with Git and other version control systems.
Your First LaTeX Document
Every LaTeX document follows a basic structure:
\documentclass{article}
\title{My First Document}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
Hello, LaTeX! This is my first document.
\section{Mathematics}
Here's an equation: $E = mc^2$
And a displayed equation:
\[
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
\]
\end{document}Document Classes
LaTeX provides several document classes for different purposes:
article– For short documents, journal articles, and reportsreport– For longer documents with chaptersbook– For books with front matter, chapters, and back matterbeamer– For presentations and slidesletter– For formal letters
Essential Packages
Packages extend LaTeX's functionality. Here are some must-haves:
\usepackage{amsmath} % Advanced math formatting
\usepackage{graphicx} % Include images
\usepackage{hyperref} % Clickable links
\usepackage{geometry} % Page margins
\usepackage{listings} % Code listings
\usepackage{booktabs} % Professional tablesText Formatting
| Command | Result |
|---|---|
\textbf{bold} | bold |
\textit{italic} | italic |
\underline{underline} | underline |
\texttt{monospace} | monospace |
Lists
Create bulleted and numbered lists:
% Bulleted list
\begin{itemize}
\item First item
\item Second item
\item Third item
\end{itemize}
% Numbered list
\begin{enumerate}
\item First item
\item Second item
\item Third item
\end{enumerate}Mathematical Expressions
LaTeX excels at typesetting mathematics:
% Inline math
The equation $a^2 + b^2 = c^2$ is Pythagoras' theorem.
% Display math
\[
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
\]
% Aligned equations
\begin{align}
f(x) &= x^2 + 2x + 1 \\
&= (x + 1)^2
\end{align}Figures and Images
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{image.png}
\caption{A descriptive caption}
\label{fig:example}
\end{figure}
% Reference: See Figure~\ref{fig:example}Tables
\begin{table}[htbp]
\centering
\begin{tabular}{lcc}
\toprule
Name & Score & Grade \\
\midrule
Alice & 95 & A \\
Bob & 87 & B \\
Charlie & 92 & A \\
\bottomrule
\end{tabular}
\caption{Student grades}
\label{tab:grades}
\end{table}Citations and Bibliography
% In your .bib file:
@article{einstein1905,
author = {Einstein, Albert},
title = {On the Electrodynamics of Moving Bodies},
journal = {Annalen der Physik},
year = {1905},
volume = {17},
pages = {891--921}
}
% In your document:
As shown by Einstein~\cite{einstein1905}...
\bibliographystyle{plain}
\bibliography{references}Next Steps
Now that you understand the basics, explore more advanced topics:
- Learn TikZ – Create diagrams and graphics
- Learn PGFPlots – Generate publication-quality plots
Free LaTeX Tools
- LaTeX Preview – Test your LaTeX code with live PDF preview
- Math to LaTeX – Convert handwritten equations to LaTeX
- Excel to LaTeX – Convert spreadsheets to LaTeX tables
- Citation Generator – Generate BibTeX citations from DOIs
- AI LaTeX Generator – Generate LaTeX from text descriptions
- LaTeX Symbols Reference – Browse math operators and Greek letters
LaTeX Templates
Get started quickly with our professional templates:
- Research Paper – IEEE-style academic paper
- PhD Thesis – Comprehensive thesis template
- Beamer Presentation – Academic slides
- View all 71 templates →
Related LaTeX Articles
Best LaTeX Editors for Mac: Complete Comparison Guide 2026
From Crixet to Prism: The Evolution of AI-Powered LaTeX Editing
How to Create a Professional Resume in LaTeX (Complete Guide 2026)
LaTeX Compile: Understanding the Compilation Process
Ready to start writing?
Try Octree – the AI-powered LaTeX editor that makes writing faster and easier.
Try Octree Free →