I am trying to write some text around an image, however the text gets drawn on top of the image rather than around it:

enter image description here

This is the relevant code section:

\section*{De Boor's algorithm}

     \includegraphics[width=0.45\textwidth]{images/order2.png} \\
     \includegraphics[width=0.45\textwidth]{images/order3.png} \\
     \includegraphics[width=0.45\textwidth]{images/order4.png} \\


And these are the packages I am using (I suspect this could be a package conflict?)

\usepackage{enumitem}  % http://www.ctan.org/pkg/enumitem
\usepackage{lipsum}  % generates filler text
  • 4
    Don't use lipsum for the filler text. It has a bug that conflicts with wrapfig. github.com/patta42/lipsum/issues/16 – Ulrike Fischer Dec 28 '19 at 22:47
  • Well, that sucks : p – Makogan Dec 28 '19 at 22:52
  • 1
    You can use \blindduck[1-] from duckuments. If you give a - in the optional argument it'll put a \par inside the group and everything will work out fine. – Skillmon likes topanswers.xyz Dec 29 '19 at 0:24
  • 1
    Did you try \LipsumPar{1} instead of \lipsum[1]? \documentclass{article} \usepackage{wrapfig} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \begin{wrapfigure}[11]{r}[10pt]{6cm} \includegraphics[width=6cm]{example-image-duck} \end{wrapfigure} \lipsum[1] \begin{wrapfigure}[11]{r}[10pt]{6cm} \includegraphics[width=6cm]{example-image-duck} \end{wrapfigure} \LipsumPar{1} \end{document} seems to work as intended. – Schrödinger's cat Dec 29 '19 at 1:26

@UlrikeFischer told you what is the reason and @Skillmon one way how one can evade the problem. Here is another way which uses lipsum: use \LipsumPar{1} instead of \lipsum[1].



enter image description here

As you can see, in the second paragraph, where \LispumPar is used, the issue does not arise.

Why \LispumPar? Let's look at the documentation.

enter image description here

It basically tells you that one should use \LipsumPar instead of \lipsum if one is to simulate just text, at least this is my reading of this.

| improve this answer | |

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.