Graphics, Figures & TablesTable Caption Position

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jeremy
Posts: 4
Joined: Fri Jul 17, 2009 12:47 am

Table Caption Position

Post by jeremy »

I would like to know if there is a way to position a table caption flush with the left edge of the table? This is for tables that are less than page width and are centered on the page. Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Table Caption Position

Post by gmedina »

Hi,

if you want to limit the caption width to the table width then the floatrow package could be useful. Take a look at the following simple example:

Code: Select all

\documentclass{report}
\usepackage{floatrow}

\begin{document}

\begin{table}
\begin{floatrow}
\ttabbox
  {\begin{tabular}{|ccc|}\hline
    column 1 & column2 & column3 \\\hline
   \end{tabular}}%
  {\caption{An example of a table whose caption width equals the width of the
   table}\label{tab:test}}
\end{floatrow}
\end{table}

\end{document}
Refer to the package documentation for further information.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jeremy
Posts: 4
Joined: Fri Jul 17, 2009 12:47 am

Re: Table Caption Position

Post by jeremy »

That is what I wanted. Thank you very much.
Post Reply