Graphics, Figures & Tablesjustifying caption to table width

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ruchir_iit
Posts: 13
Joined: Tue Apr 21, 2009 9:14 am

justifying caption to table width

Post by ruchir_iit »

Hi,

Is there a way to justify a long caption to the table width. This means that the width of a long caption does not go beyond the table width even if the caption is split into multiple lines.

Regards,
Ruchir
Last edited by ruchir_iit on Fri Apr 09, 2010 5:29 am, edited 1 time in total.

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

justifying caption to table width

Post by gmedina »

Hi,

you can use some of the features provided by the floatrow package; a little example:

Code: Select all

\documentclass{article}
\usepackage{floatrow}
\usepackage{lipsum}% just to generate some text for the example

\begin{document}

\begin{figure}
\ttabbox[\FBwidth]
  {\caption{\lipsum[1]}\label{tab:test}}
  {\begin{tabular}{ccc}\hline
      column1 & column2 & column3\\\hline
   \end{tabular}}
\end{figure}

\end{document}
Please, refer to the package documentation for further information.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ruchir_iit
Posts: 13
Joined: Tue Apr 21, 2009 9:14 am

Re: justifying caption to table width

Post by ruchir_iit »

Hi gmedina,

Thank you very much for the help!! The problem is solved!!
Post Reply