LaTeX Figure Caption
\caption inside figure. Convention: caption BELOW figures, ABOVE tables. \label for cross-referencing. caption package for styling.
The basic pattern
\begin{figure}[t]
\centering
\includegraphics[width=0.8\textwidth]{architecture.png}
\caption{Overall system architecture.}
\label{fig:architecture}
\end{figure}
% Reference in body:
% "Our architecture is shown in Figure~\ref{fig:architecture}."
% Or with hyperref's \autoref:
% "See \autoref{fig:architecture}." → "See Figure 1."Caption position: figures vs tables
| Element | Caption position |
|---|---|
| figure | BELOW (after \includegraphics) |
| table | ABOVE (before \begin{tabular}) |
Customize with the caption package
\usepackage{caption}
% Global caption settings
\captionsetup{
font=small, % smaller than body text
labelfont=bf, % bold "Figure 1:"
format=hang, % hanging indent for long captions
labelsep=colon, % "Figure 1: caption"
justification=justified,
}
% Different settings for figures vs tables
\captionsetup[figure]{font=small, labelfont=bf}
\captionsetup[table]{font=small, labelfont=bf, position=top}Common labelsep options
| Option | Output |
|---|---|
| colon | Figure 1: caption (default) |
| period | Figure 1. caption |
| space | Figure 1 caption |
| newline | Figure 1 [break] caption |
| endash | Figure 1 – caption |
Short caption for List of Figures
\caption[Short version]{
This is the long version of the caption that appears
under the figure but the short version goes in the
List of Figures.
}Unnumbered caption
\usepackage{caption}
\begin{figure}
\centering
\includegraphics{example.png}
\caption*{This caption has no "Figure N:" prefix.}
\end{figure}Common mistakes
- Caption ABOVE the figure (or BELOW the table). Wrong by convention. Captions go below figures, above tables.
- Forgetting
\label. Without it, you can't reference the figure. Add\label{fig:name}right after\caption. - Using
\refalone. Produces just '1'. Use\autoref(with hyperref) or write 'Figure~\ref' for the full form. - Multiple
\captionin one figure. Use subcaption package or sub-environments instead. - Caption without figure environment.
\captionneeds a float environment. For inline numbering use\captionof{figure}{...}.
#figure(
image("architecture.png", width: 80%),
caption: [Overall system architecture.]
) <arch>
// Reference: see @archTry TypeTeX free Frequently Asked Questions
Inside a figure environment, add \caption{Your caption text} after \includegraphics. Convention: figures get captions BELOW the image, tables get captions ABOVE the data. Add \label{fig:name} after the caption to enable cross-referencing with \ref{fig:name}.
Convention: figures BELOW, tables ABOVE. This is consistent across most journal styles. Place \caption after \includegraphics for figures, and BEFORE the tabular environment for tables. Some templates override; follow the template's convention.
Load the caption package: \usepackage{caption}. Then \captionsetup{font=small, labelfont=bf, format=hang, justification=justified}. font=small makes the caption smaller than body; labelfont=bf makes 'Figure 1:' bold; format=hang indents continuation lines under the start of the caption text.
\captionsetup{labelsep=colon} for 'Figure 1: text' (default). labelsep=period for 'Figure 1. text'. labelsep=space for 'Figure 1 text'. labelsep=newline puts the caption on a new line below the label. APA prefers newline; IEEE prefers colon.
Long captions automatically wrap. To control: \captionsetup{format=hang, indention=2em} hangs continuation lines indented. For very long captions, consider \caption[Short version for List of Figures]{Long version for the figure itself}.
Use \caption*{Your caption} (with the caption package). Produces caption without 'Figure N:' prefix and doesn't increment the figure counter. Useful for example figures or one-off illustrations that don't need formal cross-referencing.
Use a minipage or wrapfig: minipage gives explicit control, wrapfig (from wrapfigure package) wraps body text around the figure. For caption beside (not above/below) the image, use a sidecap (sidecaption) package.
Add \label{fig:architecture} after \caption inside the figure. Then \ref{fig:architecture} produces just '1'. \autoref{fig:architecture} (with hyperref) produces 'Figure 1' with a clickable link. Most authors use \autoref or 'Figure~\ref{fig:architecture}' for the explicit form.
Default caption alignment is centered for short captions, justified for long. To force: \captionsetup{justification=centering} for always centered, justification=raggedright for left-aligned. Some journals require specific alignment — check the call for papers.