文字环绕不规则形状

文字环绕不规则形状

我正在尝试将一些文本环绕在页面右侧的树莓形状图像周围。我非常希望文本能够遵循树莓的形状。这可能吗?

下面是 MWE 和我现在拥有的图像。

\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}

在此处输入图片描述

答案1

我要回答我自己的问题,以防有人对此感到困惑。

我用的是卡特温包,如建议的线程。(感谢 Schumacher 提供的链接)。输出结果非常不错。下面是我在报告中使用的实际代码。

\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}

在此处输入图片描述

相关内容