Graphics, Figures & TablesAligning figure captions with the text

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
depic
Posts: 1
Joined: Sun Jan 30, 2011 2:23 pm

Aligning figure captions with the text

Post by depic »

Hi all,

I have trawled the internet but cannot find the answer to this simple question:

What command (and where do I put it) to make the width of the figure caption equal to the width of the main text?

Currently the figure text overhangs the margins and it looks rubbish! This is what I'm using:

\begin{figure}
\centering
\includegraphics[height=80mm]{Picture.jpg}
\caption{...long figure caption....}
\label{Picture}
\end{figure}

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Aligning figure captions with the text

Post by localghost »

depic wrote:[…] What command (and where do I put it) to make the width of the figure caption equal to the width of the main text?[…]
Somehow I can't comprehend the problem.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{blindtext}

\begin{document}
  \blindtext

  \begin{figure}[!ht]
    \centering
    \rule{6.4cm}{3.6cm}
    \caption{\blindtext}\label{fig:dummy}
  \end{figure}

  \blindtext
\end{document}
So it's your turn to show the opposite by a proper and minimal example.


Best regards and welcome to the board
Thorsten
Post Reply