4

The captions between the pictures are too close to each other. How can I make some space between them, but do not move pictures itself? enter image description here

\documentclass{article}
\usepackage{graphicx,subfigure}
\begin{document}

\begin{figure*}
\centering
\subfigure[One two three four five six seven eight ninte ten eleven twelve]{\label{fig:a}\includegraphics[width=0.32\textwidth]{A.png}}
\subfigure[One two three four five six seven eight ninte ten eleven twelve]{\label{fig:b}\includegraphics[width=0.32\textwidth]{B.png}}
\subfigure[One two three four five six seven eight ninte ten eleven twelve]{\label{fig:b}\includegraphics[width=0.32\textwidth]{B.png}}
\caption{my caption}                                                            
\end{figure*}
\end{document}

1 Answer 1

5

You can use caption package and adjust the width of captions for subfigures. caption also provides other means to customize your captions, for details refer to its documentation.

Please note that the subfigure package is obsolete and you can use either subcaption package (which provides subfigure environment) or subfig package (which provides subfloat). I have used subcaption package.

\documentclass[twocolumn]{article}
\usepackage{caption,subcaption,showframe}   %% remove showframe
\usepackage{graphicx}
\captionsetup[subfigure]{width=0.8\linewidth}    %% adjust here
\begin{document}

\begin{figure*}
\centering
\begin{subfigure}{.33\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{One two three four five six seven eight ninte ten eleven twelve}\label{fig:a}
\end{subfigure}%
\hfill
\begin{subfigure}{.33\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\caption{One two three four five six seven eight ninte ten eleven twelve}\label{fig:b}
\end{subfigure}%
\hfill
\begin{subfigure}{.33\textwidth}
\includegraphics[width=\linewidth]{example-image-c}
\caption{One two three four five six seven eight ninte ten eleven twelve}\label{fig:b}
\end{subfigure}
\caption{my caption}
\end{figure*}
\end{document}

enter image description here

You can make it local by adding \captionsetup inside the figure* environment (instead of preamble).

\begin{figure*}
\captionsetup[subfigure]{width=0.8\linewidth}
\centering
\begin{subfigure}{.33\textwidth}
.
.
.

enter image description here

2
  • How to add captionsetup only for a figure, but not to the whole document?
    – ashim
    Commented Apr 1, 2014 at 12:28
  • @msh Put \captionsetup[subfigure]{width=0.8\linewidth} inside figure* environment. Don't put it in the preamble. Answer updated.
    – user11232
    Commented Apr 1, 2014 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .