我可以使用 \cutout 将文本置于段落的中心吗?

我可以使用 \cutout 将文本置于段落的中心吗?

实际上,我需要使用\shapepar\cutout\begin{ctuout}但我有两个问题 1. 我可以使用\cutout将文本置于段落的中心吗? 2.并添加\includegraphics

\documentclass{article} \usepackage{graphicx,cutwin}
\usepackage{shapepar}

\begin{document}
\opencutcenter
\cutout{}(15em,-6\baselineskip)\shapepar {\circleshape}
cut cut cut cut cut cut cut cut cut cut cut cut cut cut cut cut
cut cut cut cut cut cut cut cut cut cut cut cut\par
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
\end{document}

答案1

这是对您的 MWE 的修改。

% cutoutprob.tex  SE 561036

\documentclass{article}
\usepackage{shapepar}
\let\cutout\relax % don't want shapepar's \cutout, need cutwin's version
\usepackage{graphicx,cutwin}

\begin{document}

% put this in the cutout
\renewcommand{\windowpagestuff}{\centering 
\shapepar {\circleshape}
cut cut cut cut cut cut cut cut cut cut cut cut cut cut cut cut
cut cut cut cut cut cut cut cut cut cut cut cut\par
}

\opencutcenter % rectangular cutout in center of text
\begin{cutout}{3}{0.3\textwidth}{0.3\textwidth}{10}
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text

\end{cutout}
\end{document}

在此处输入图片描述 它在段落中创建一个矩形切口text,然后将cut文本形状插入切口的中心。

如果你想把一个图形放入切口,那么可以进行\windowpagestuff相应的修改,例如

renewcommand{\windowpagestuff}{\centering \includegraphics{...}}.

相关内容