Graphics, Figures & TablesTable Caption Wrapping

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tennesseepaul
Posts: 7
Joined: Fri Apr 10, 2009 12:16 am

Table Caption Wrapping

Post by tennesseepaul »

Hello. I'm new here, so perhaps this has been discussed. I just can't seem to find it. I am writing a document which requires the captions (Title) of the table be left justified to the beginning of the table and wrap the caption so that it does not exceed the width of the table. The tables are centered in the document page. Any ideas? I've got nothing right now. All my tables are merely centered, the caption is centered and long captions span the width of the page, while remaining centered.

Thank you for your help.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Table Caption Wrapping

Post by gmedina »

Hi,

sounds like a job for the floatrow package; a little example:

Code: Select all

\documentclass{article}
\usepackage{floatrow}

\begin{document}

\begin{table}
  \ttabbox
  {\caption{A table with a caption with a width that equals that of 
  the table}\label{tab:test}}
  {\begin{tabular}{ccc}\hline
    a & b & c\\\hline\end{tabular}}
\end{table}

\end{document}
For further information please refer to the package documentation.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
tennesseepaul
Posts: 7
Joined: Fri Apr 10, 2009 12:16 am

Re: Table Caption Wrapping

Post by tennesseepaul »

Perfection! That was exactly what I needed.

Thank you!
Post Reply