LaTeX Wiki
Register
Advertisement

The table environment makes a table float to a convenient place, such as the top of a following page.

Syntax[]

\begin{table}[placement]
    table body
    \caption{title}  % optional
    \label{label}    % also optional
\end{table}

The floating behavior can be controlled with the optional placement specifier; possible values are t (top), b (bottom), and p (dedicated page for floats). Use h to make the table appear where it was defined, or simply don't use the table environment.

Example[]

\begin{table}
	\centering
	\begin{tabular}{ll}
		Author    & Piece                 \\ \hline
		Bach      & Cello Suite Number 1  \\
		Beethoven & Cello Sonata Number 3 \\
		Brahms    & Cello Sonata Number 1
	\end{tabular}
	\caption{Top cello pieces}
	\label{tab:cello}
\end{table}

See also[]

  • \listoftables
  • figure (equivalent environment for images)
  • \ref (for referring to labels)
  • tabular

External links[]

Advertisement