4

I'd like to have an informational box placed to the edge of a page of text, and have the text wrap around it, like so: enter image description here How should I go about doing this?

2

Here is a short example using wrapfig package:

\documentclass{article}
\usepackage{wrapfig}

\usepackage{mwe}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{wrapfigure}{r}{0pt}%
  \includegraphics[width=4cm]{example-image-a}%
\end{wrapfigure}
\lipsum[2]
\begin{wrapfigure}{l}{0pt}%
  \includegraphics[width=5cm]{example-image-b}%
\end{wrapfigure}
\lipsum[3-4]
\end{document}

enter image description here

|improve this answer|||||
  • Why do you put 0pt? If the figures are wider than 0pt? – skpblack Nov 2 '14 at 0:20
  • @skpblack - From wrapfig manual: "...if you specify a width of zero (0pt), the actual width of the figure will determine the wrapping width." – Paul Gaborit Nov 2 '14 at 8:17

Your Answer

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