0:00
❦ ⁕ ❦

The LATEX
Storybook

A pocket grimoire of mathematical typesetting — learn the fundamentals of LaTeX in under ten minutes, with everything live and visible.

SEVEN CHAPTERS LIVE EDITORS NO INSTALLS

Chapter the First

What Even Is LaTeX?

✦ ❦ ✦

In which we discover a typesetting language born to make beautiful equations.

LaTeX (pronounced "lay-tek" or "lah-tek") is a typesetting system. You write plain text with special commands, and it turns into beautifully formatted documents — especially for math, science, and academic papers. Microsoft Word lets you see formatting as you type. LaTeX, by contrast, makes you describe formatting with little instructions like \textbf{bold}, then renders the result.

Why bother? Because LaTeX produces the most beautiful equations and documents you've ever seen — the kind you find in physics textbooks and research papers. And once you know a handful of commands, it's actually faster than fighting with a word processor.

The Big Idea

Everything in LaTeX is either regular text or a command. Commands start with a backslash \. Math goes between dollar signs $ ... $. That's basically it.

Try it: Click the dark box and edit the text. The right side updates as you type. Try changing E = mc^2 to something else!

That's the whole game: text + commands → polished output. Now let's actually learn the commands.

— i —
Chapter the Second

Your First Equations

∑ ∫ ∂

Of superscripts, subscripts, and the small punctuation that powers all of mathematics.

Two of the most useful tools in your kit are the caret ^ for superscripts (things that go up, like exponents) and the underscore _ for subscripts (things that go down, like indices).

Single characters need no braces: x^2 renders as $x^2$. But for anything longer than one character, wrap it in curly braces: x^{10} gives $x^{10}$, while x^10 would give $x^10$ — only the 1 goes up.

Fractions, Roots, and Friends

Fractions use \frac{top}{bottom}. Square roots use \sqrt{x}. For other roots, write \sqrt[3]{x}. Try them:

The pattern: command name, then arguments in {...} braces. \frac{2}{3}, \sqrt{16}, \textbf{bold} — they all follow the same shape.
Your turn. Write LaTeX that produces this fraction:
$\frac{1}{2}$
— ii —
Chapter the Third

A Bestiary of Symbols

α β γ δ

Greek letters, operators, and the magical incantations that summon them.

Every Greek letter has a name in English, and that name is its LaTeX command. \alpha gives $\alpha$, \beta gives $\beta$, \pi gives $\pi$. Capital versions just capitalize the first letter: \Alpha... well, almost. The capital Greek letters that look like Latin letters (Α, Β, Ε...) aren't usually defined — but the distinct ones are: \Sigma $\Sigma$, \Omega $\Omega$, \Delta $\Delta$.

Click any symbol below to copy its command. Then paste into the editor and watch it render.

Greek (lowercase)

Greek (capital — the distinct ones)

Operators & Relations

Arrows & Logic

Pro tip: \quad adds a wide space. Math ignores normal spaces, so use \, (small), \; (medium), or \quad (large) when you need breathing room.
— iii —
Chapter the Fourth

Sums, Integrals & Limits

∑ ∏ ∫

The big operators that make mathematics look mathematical.

Sums, integrals, products, and limits are the showpieces of math typography. They all follow the same pattern: a command name, then _ for what's below, and ^ for what's above.

The recipe

\sum_{i=1}^{n} i^2 becomes $\sum_{i=1}^{n} i^2$.
\int_0^\infty e^{-x} dx becomes $\int_0^\infty e^{-x} dx$.
\lim_{x \to 0} \frac{\sin x}{x} becomes $\lim_{x \to 0} \frac{\sin x}{x}$.

Display vs inline: Inside $...$ these are squished to fit one line. Inside $$...$$ they stretch out tall and beautiful. Try the same expression in both modes!

Famous big operators

Reproduce this sum:
$\sum_{i=1}^{n} i$
— iv —
Chapter the Fifth

Matrices & Cases

⌈ ⌊ ⌉ ⌋

Building grids of numbers, piecewise functions, and aligned equations.

Matrices live inside \begin{...} ... \end{...} blocks called environments. There are several flavors depending on which brackets you want around the matrix:

pmatrix — round parentheses
bmatrix — square brackets
vmatrix — vertical bars (for determinants)
matrix — no brackets at all

Inside, separate columns with & and rows with \\.

Piecewise functions with cases

The cases environment is perfect for piecewise definitions. Same idea — & separates the value from its condition, \\ ends a row.

Aligning multiple equations

To stack equations and align them by their equals signs, use aligned with & placed where you want the alignment column.

Remember: & = column separator. \\ = row break. This pattern shows up everywhere in LaTeX — tables, matrices, alignments, cases. Learn it once, use it forever.
— v —
Chapter the Sixth

A Whole Document

¶ § ¶

The skeleton of every LaTeX paper, simplified to its essential bones.

Up until now we've focused on math snippets. But LaTeX shines brightest when typesetting whole documents. Every LaTeX file has the same basic shape:

\documentclass{article} % the type of document \usepackage{amsmath} % load math extensions \title{My First Paper} \author{Your Name} \date{\today} \begin{document} % everything visible goes here \maketitle \section{Introduction} Hello world! Here is some math: $E = mc^2$. \subsection{Details} A famous equation: $$e^{i\pi} + 1 = 0$$ \end{document}

Anatomy

Preamble — everything before \begin{document}. This is where you load packages (extensions), set the title, and configure the document.

Body — between \begin{document} and \end{document}. This is where the actual content lives.

Useful sectioning commands

\section{Title}, \subsection{Title}, \subsubsection{Title} — automatic numbering and a table of contents await.
\textbf{bold}, \textit{italic}, \underline{under}, \emph{emphasis} — text formatting.
\begin{itemize} for bullet lists, \begin{enumerate} for numbered lists, with \item for each entry.

Most useful packages

amsmath — better math (the aligned environment, \text{} in math, etc.).
graphicx — include images with \includegraphics{file.png}.
hyperref — clickable links and references.
geometry — change margins easily.

Where to actually run LaTeX? The easiest way is Bibby (trybibby.com) — a free online editor with AI-powered writing help. No installation. Paste your document, compile, get a PDF. Done.
— vi —
Chapter the Seventh

The Grand Playground

✦ ❦ ✦

Everything you've learned, in one cheat sheet — and a sandbox to test it all.

Quick reference

Famous equations to try

Click any equation to load it into the playground:

Your playground

Mix and match. Build something beautiful.

❦ ⁕ ❦

You did it.

You've journeyed through the seven chapters of the LaTeX Storybook. You can now write equations, structure documents, and decode the syntax that powers nearly every math paper, physics textbook, and academic publication in existence.

Total time:

Write with Bibby now!
— vii —