1

I'm writting a memoir and I have figures inside. A normal figure looks like that : no wrapfigure used

using the following code

\begin{figure}[H]
\begin{center}
\includegraphics[width=0.65\textwidth]{...}\hspace{0.25cm}
\includegraphics[width=0.30\textwidth]{...}
\end{center}
\caption{...}\label{...}
\end{figure}

But when I use wrapfigures like here : with wrapfigure

with the following code :

\begin{wrapfigure}[13]{r}{0.45\textwidth}
\centering
\vspace{-1cm}
\begin{center}
\includegraphics[width=0.45\textwidth]{...}
\end{center}
\vspace{-1cm}
\caption{...}\label{...}
\end{wrapfigure}

the caption changes. I mean for a normal figure there is no space between lines in the caption. But for a wrapfigure, there is as much space between lines as in the text + the textsize is bigger for the caption of a wrapfigure. What is wrong ? I want my caption to be compact as the first image.

7
  • 2
    As always on this site, please post a full minimal example (you can replace the images with, say, \rule{4cm}{4cm}. Then is a lot easier for others to help you. For example you could not use the center env to center figs inside the figure env, though that is not related to this issue.
    – daleif
    Jul 20 '17 at 14:33
  • Sorry I'm just getting started on the site...
    – John
    Jul 20 '17 at 14:36
  • 1
    unrelated to the caption but you just want \centering delete the center enviornment (which is just adding vertical space) and the negative vspace (which is compensating for the spuriuous center) presumably you have doublespacing specified somewhere in your document together with specifying single spacing for figures but not wrapfigures Jul 20 '17 at 14:40
  • Yet unrelated, you might want to take a look at the siunitx package to format those units. 398,17 nm looks wrong (wrong spacing around the comma). Plus missing spaces at ³Fe₂ and et3 mTorr
    – daleif
    Jul 20 '17 at 14:50
  • @deleif : in France the comma is like the english dot, so in France 398,17 = 398.17 in US/UK. And David Carlisle : it was a bad copy/paste, I corrected it but nothing changes + the thing with the F is a spectroscopic notation. But thanks for the et3 mTorr ;)
    – John
    Jul 20 '17 at 14:54
-1

I manually use the command \linespread{1}\selectfont before caption and \linespread{1.4}\selectfont again after \end{wrapfigure}

1
  • 4
    this is hardly an answer to the question as posed, presumably you had \linespread already earlier which you had not mentioned, and which was the cause of the problem? it is a local setting so you should not need to reset it after the environment. normally it is better to use setspace or a similar package that manages setting/resetting the line spacing in figures rather than using \linspread directly. Jul 20 '17 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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