2

How can I display two consecutive images on the right of the page, with the second appearing below the first? At present the first does not float at all, only the second does. I do not want to place both images in the same wrapfigure, as there could be a page break between them.

MWE:

\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters


\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage[demo]{graphicx}
\pagestyle{empty} \begin{document}\begin{wrapfigure}{R}{12em}
  \includegraphics[width=\linewidth]{image}
\end{wrapfigure}

\begin{wrapfigure}{R}{12em}
  \includegraphics[width=\linewidth]{image}
\end{wrapfigure}

\lipsum[1]

\end{document}

Image example

0

1 Answer 1

4

You could put both images into one wrapfig.

\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters

\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage[demo]{graphicx}
\pagestyle{empty} 
\begin{document}
\begin{wrapfigure}{R}{12em}
  \includegraphics[width=\linewidth]{image}
  \smallskip\par
  \includegraphics[width=\linewidth]{image}
\end{wrapfigure}

\lipsum[1-2]

\end{document}

demo


Otherwise you are limited to one wrapfig per paragraph.

\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage[demo]{graphicx}
\pagestyle{empty} 

\begin{document}
\begin{wrapfigure}{R}{12em}
  \includegraphics[width=\linewidth]{image}
\end{wrapfigure}
\lipsum[1]

\begin{wrapfigure}{R}{12em}
  \includegraphics[width=\linewidth]{image}
\end{wrapfigure}
\lipsum[2]

\end{document}

alternate solution

2
  • I do not want to place both images in the same wrapfigure, as there could be a page break between them if they are near the end of the page. Apr 6, 2016 at 22:41
  • If you place a wrapfig too close to the end of the page to fit, it will not start until the next paragraph anyway. If you put a wrapfig in the middle of a paragraph, it will wait until the next paragraph to start. Apr 7, 2016 at 3:28

You must log in to answer this question.

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