CAPTIONS & REFERENCES
LaTeX table captions, labels and references
Literal text table examples · browser preview is not TeX compilation
A caption explains a table; a reference label gives the surrounding document a stable identifier for it. Neither is the same as the table’s first row of column headings.
Write a meaningful caption
Use the optional caption field to describe what the reader is comparing,
including units or conditions where necessary. In generated source, a
caption wraps the tabular content in a table float. The final
LaTeX application decides where that float fits on the page.
Add a stable reference label
A label requires a caption in this builder and must start with a letter. Use
a short identifier such as tab:results rather than a whole
sentence. The generated \label{tab:results} follows the caption
so it can refer to the table number.
| Trial | Score |
|---|---|
| A | 8 |
| B | 9 |
Browser specimen · compile the source in your LaTeX application to check the final layout.
\begin{table}[htbp]
\centering
\caption{Trial results}
\label{tab:results}
\begin{tabular}{lr}
\hline
\textbf{Trial} & \textbf{Score} \\
\hline
A & 8 \\
B & 9 \\
\hline
\end{tabular}
\end{table}Open the Table Generator Refer from the surrounding document
Write Table~\ref{tab:results} in your destination document. Do
not type the table number manually if it may change. A label must be unique
within that document; the browser tool cannot inspect labels in other files.
Unresolved references may require another compilation pass in your LaTeX
application.
Check placement after compilation
The browser specimen shows the caption and cells but does not assign the final document’s number, resolve references or reproduce float placement. Download the .tex file for a standalone document, or copy the source into an existing document. Inspect the compiled result before sending it to a reader. This builder does not offer arbitrary float-placement or long-table controls.
Syntax reference
LaTeX table syntax reference. The examples above are limited to the features described here; additional packages are not implied.
Continue with LaTeX Table Generator.