3

I'm trying to use "wrapfigure" in an environment where there is not enough text to cover the height of the graphic. I've tried resizing the graphic, but it loses definition and looks horrible. Here is my mwe -

\documentclass[a4paper,12pt]{report}
 \usepackage{graphicx,wrapfig}
 \begin{document}

\subsubsection{The back of your bra rides up towards your shoulder blades}
\begin{wrapfigure}{r}{5.5cm}
\rule{148pt}{210pt}
\caption{The bra strap riding up to your shoulder blades}
\end{wrapfigure}
If the back of the bra rides up towards your shoulder blades it usually
indicates the back of the bra is too big. For example – if you are wearing
a 36C, it may be worth trying a 34D or even a 32DD. (Take a look at our
bra sizing guide to help you with this.) 

\subsubsection{The bra cup digs into your bust at the top creating a ‘double-bust’ effect }
\begin{wrapfigure}{r}{5.5cm}
\rule{148pt}{210pt}
\caption{The bra cup digging into your bust}
\end{wrapfigure}
If the bra cups digs into your bust at the top, it is a sure sign that
the bra cup is too small. Try the next cup size up! 

\end{document}

pagedump

How can I change it so that the second wrapfigure is in its right place, please, and that the text just flows naturally?

Coloured bottom box to the right is where I'm wanting the second wrapfigure to show.

2
  • Does placing the second image inside the first wrapfigure do what you want? Feb 14, 2015 at 16:02
  • @TorbjørnT. Not really. It places the second graphic and its caption below figure 1, but the text retains its original place beside figure 1.
    – boudiccas
    Feb 14, 2015 at 16:41

1 Answer 1

4

wrapfig does warn in the log that it can not place the figures as they overlap. Basically it has used up all the text alongside the first figure so it can't do anything useful with the second. You can give it a bit of help:

enter image description here

\documentclass[a4paper,12pt]{report}
 \usepackage{graphicx,wrapfig}
 \begin{document}

\subsubsection{The back of your bra rides up towards your shoulder blades}
\begin{wrapfigure}[6]{r}{5.5cm}
\vspace{-\baselineskip}
\rule{148pt}{210pt}
\caption{The bra strap riding up to your shoulder blades}
\end{wrapfigure}%
If the back of the bra rides up towards your shoulder blades it usually
indicates the back of the bra is too big. For example – if you are wearing
a 36C, it may be worth trying a 34D or even a 32DD. (Take a look at our
bra sizing guide to help you with this.)

\vspace{6cm}

\subsubsection{The bra cup digs into your bust at the top creating a ‘double-bust’ effect }
\begin{wrapfigure}{r}{5.5cm}
\vspace{-\baselineskip}
\rule{148pt}{210pt}
\caption{The bra cup digging into your bust}
\end{wrapfigure}%
If the bra cups digs into your bust at the top, it is a sure sign that
the bra cup is too small. Try the next cup size up! 

\end{document}

Here I have put the space so the second heading keeps with the second figure, which seems more natural, you could add space later leaving the second heading alongside the first figure but I thought that looked a bit strange, but either way you just need to make sure that there is enough content (even if it is white) for wrapfig to attach the figures.

2
  • Thank you, it took a bit of time for me to see exactly how you'd done it, but the thing that made it work most of all here was the extra '%' after \end{wrapfigure}.
    – boudiccas
    Feb 14, 2015 at 16:52
  • @boudiccas if in doubt, adding a % never does any harm:-) Feb 14, 2015 at 17:18

You must log in to answer this question.

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