Learn LaTeX in 10 Minutes

A beginner-friendly introduction to the world's best typesetting system.

What is LaTeX?

LaTeX is a document preparation system used for producing high-quality typeset documents. Unlike word processors where you format text visually, in LaTeX you write plain text with markup commands, and the system handles layout, fonts, spacing, and numbering automatically. It is the standard tool for academic papers, theses, books, and any document involving mathematical notation.

Your First Document

Every LaTeX document starts with a \documentclass command and wraps its content between \begin{document} and \end{document}. Here is the simplest possible document:

\documentclass{article}

\begin{document}
Hello, world! This is my first LaTeX document.
\end{document}

The \documentclass{article} command tells LaTeX you are writing an article. Other document classes include report, book, letter, and beamer (for presentations).

Paste the code above into our editor and compile it to see the result instantly.

Try it in our editor

Adding a Title

Use \title, \author, and \date in the preamble (before \begin{document}), then call \maketitle inside the document body to render the title block:

\documentclass{article}

\title{My First Paper}
\author{Jane Doe}
\date{February 2026}

\begin{document}
\maketitle

This is the body of my document.
\end{document}

If you omit \date{}, LaTeX will insert today's date automatically. To suppress the date entirely, use \date{} with empty braces.

Sections and Paragraphs

LaTeX provides a hierarchy of sectioning commands. They are automatically numbered and can be used to generate a table of contents:

\section{Introduction}
This is the introduction. LaTeX handles section numbering
for you automatically.

\subsection{Background}
Subsections appear as 1.1, 1.2, and so on.

\subsubsection{Details}
You can nest even deeper if needed.

\section{Methods}
A blank line between text creates a new paragraph.

This is a new paragraph. LaTeX adds proper indentation
and spacing between paragraphs automatically.

To add a table of contents, place \tableofcontents right after \maketitle. You may need to compile twice for it to appear correctly.

Text Formatting

LaTeX provides commands for common text formatting:

\textbf{This text is bold.}
\textit{This text is italic.}
\underline{This text is underlined.}

% You can also nest formatting commands:
\textbf{\textit{Bold and italic text.}}

Math Mode

One of the greatest strengths of LaTeX is its math typesetting. Use dollar signs for inline math and backslash-bracket notation for display equations:

% Inline math appears within the text flow:
The equation $E = mc^2$ is famous.

% Display math is centered on its own line:
\[ a^2 + b^2 = c^2 \]

% A more complex example:
\[ \int_{0}^{\infty} e^{-x^2} \, dx = \frac{\sqrt{\pi}}{2} \]

See your equations rendered beautifully in real time.

Try it in our editor

Lists

LaTeX supports both unordered (bullet) and ordered (numbered) lists:

% Unordered list:
\begin{itemize}
    \item First item
    \item Second item
    \item Third item
\end{itemize}

% Ordered list:
\begin{enumerate}
    \item Step one
    \item Step two
    \item Step three
\end{enumerate}

You can nest lists inside each other by placing one list environment inside an \item of another. LaTeX will adjust the bullet style or numbering automatically for each level.

Next Steps

Now that you understand the basics, explore these topics to level up your LaTeX skills: