[Tex/LaTex] Wrap text around an irregular shape

floatswrapwrapfigure

I'm trying to wrap some text around a raspberry shaped image that is placed to the right on the page. I would realy liked the text to follow the shape of the Raspberry. Is this possible?

Below is a MWE, and an image of what I have for now.

\documentclass[12pt]{scrartcl}
\usepackage{graphicx,wrapfig,lipsum}
\usepackage[onehalfspacing]{setspace}

\begin{document}
\begin{wrapfigure}{r}{.3\linewidth}
    \centering
    \includegraphics[width=\linewidth]{raspberry_pi_logo}
    \caption{Raspberry Pi}
\end{wrapfigure}
\lipsum[2]\lipsum[1]

\end{document}

enter image description here

Best Answer

I'm gonna answer my own question, in case someone stumbles over this.

I used the cutwin package, as suggesten in this thread. (Thanks Schumacher for the link). The output came out pretty nice. Below is the actual code I used in my report.

\documentclass[12pt]{scrreprt}
\usepackage{graphicx,pstricks,cutwin}
\usepackage[onehalfspacing]{setspace}


\begin{document}

~\\[1cm]
\opencutright
\newcommand\Margins{%
    0.68\linewidth, 
    0.66\linewidth,
    0.64\linewidth,
    0.64\linewidth,
    0.66\linewidth,
    0.68\linewidth,
    0.74\linewidth,
    1\linewidth
}
\renewcommand\putstuffinpic{%
    \rput(0cm,-1.0cm){%
        \includegraphics[width=0.4\textwidth]{raspberry_pi_logo}
    }
}
\begin{center}
    \begin{minipage}{.8\textwidth}
        \begin{shapedcutout}{0}{8}{\Margins}\itshape\noindent
            ``The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It is a capable little computer which can be used in electronics projects, and for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.''
        \end{shapedcutout}
        ~\\[-3em]\flushright --- The Raspberry Pi Foundation.
    \end{minipage}
\end{center}

\end{document}

enter image description here

Related Question