Graphics, Figures & Tables ⇒ justifying caption to table width
-
- Posts: 13
- Joined: Tue Apr 21, 2009 9:14 am
justifying caption to table width
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
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
justifying caption to table width
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}
-
- Posts: 13
- Joined: Tue Apr 21, 2009 9:14 am
Re: justifying caption to table width
Thank you very much for the help!! The problem is solved!!