1

I have a problem with the captions of my figures in a paper I am writing using the IOP template. I am using the usual package \usepackage{graphicx}.

And the LaTeX commands are

\begin{figure}[!h]
\centering
\includegraphics[width= 7.5cm,height=6cm]{figures/fig1.pdf}
\includegraphics[width= 7.5cm,height=6cm]{figures/fig2.pdf}
\caption[width = \textwidth]{Bla bla bla}
\label{fig:1}
\end{figure}

which are pretty standard. The result I get is

enter image description here

As you can see the caption is not aligned with the figures, and it actually not even aligned with the text. What can I do?

3
  • 1
    Please include an MWE, as it is rather impossible for us to see what you are doing wrong here (contrary to popular belief we don't have a crystal ball, unfortunately). Also, \caption does not take optional arguments, what you place inside [ ] (the short caption) is used instead of the long caption inside { } in the List of Figures.
    – sodd
    Feb 18, 2016 at 12:49
  • This alignment is defined by the template and you should not try to modify it for this publication. As it is a template for a publication, you have to satisfy the publisher requirements Feb 18, 2016 at 13:02
  • I am sorry hooy if I havant been clear. I was hoping this was a standard problem. And Yes you are right about the square brackets. Feb 18, 2016 at 14:57

1 Answer 1

0

Try the following:

\usepackage{graphicx, caption}
\usepackage{lipsum} % for dummy text only

\begin{figure}[!h]
  \centering
  \captionsetup{width=\linewidth}
  \includegraphics[width= 7.5cm,height=6cm]{figures/fig1.pdf}
  \includegraphics[width= 7.5cm,height=6cm]{figures/fig2.pdf}
  \caption[Second figure]{\lipsum*[2]} 
  \label{fig:1}  
\end{figure}
2
  • This was really helpful ! Now the captions are indeed allingned. I had to cancel the command \caption[Second figure]{\lipsum*[2]} because my compiler did not recognize it, but the rest did the job perfectly. Deeply appreciated. Feb 18, 2016 at 15:03
  • Glad it worked ! you might not have the package installed, not so important though :)
    – Georges
    Feb 19, 2016 at 16:40

You must log in to answer this question.

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