Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 8 down vote accepted

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

share|improve this answer
    
How to add captionsetup only for a figure, but not to the whole document? –  msh Apr 1 at 12:28
    
@msh Put \captionsetup[subfigure]{width=0.8\linewidth} inside figure* environment. Don't put it in the preamble. Answer updated. –  Harish Kumar Apr 1 at 13:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.