I have to insert two pictures of different width one below the other on the side of a text, and wrap the text around. I'd like the pictures to stay close to each other, so I don't want any text but the captions between the images.

Therefore I tried to put both the pictures inside the same wrapfigure environment, as in the following code:



        \draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);
    \caption{A big square}

        \draw (0,0) -- (2,0) -- (2,2) -- (0,2) -- (0,0);
    \caption{A small square}



Output: enter image description here

How do I get rid of the whitespace between the text and the second figure?

  • 2
    I won't do it. I will add \centering instead. – user156344 Mar 30 at 11:18
  • 3
    Don't use flushright - that's internally a list and adds space, use e.g. \raggedleft or \mbox{}\hfill \includegraphics ... – Ulrike Fischer Mar 30 at 11:19
  • 2
    It is possible to manually insert a wrapfig in the middle of a paragraph (but not using \lipsum or \blandtext). However, in this case it would look better to keep the width constant (especially with captions). – John Kormylo Mar 30 at 12:57

Your Answer

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

Browse other questions tagged or ask your own question.