![使用带有自定义段落分隔符的 wrapfigure](https://linux22.com/image/386608/%E4%BD%BF%E7%94%A8%E5%B8%A6%E6%9C%89%E8%87%AA%E5%AE%9A%E4%B9%89%E6%AE%B5%E8%90%BD%E5%88%86%E9%9A%94%E7%AC%A6%E7%9A%84%20wrapfigure.png)
在我的文档中,我进行了修改,\parskip
以便在段落之间留出一个很好的间隔。但这意味着\wrapfigure
计算行数时出错,并给自己留出比所需大得多的边距。
我该如何修复这个问题?我希望文本能够流入 的正下方\wrapfigure
,就像我移除调整后的效果一样\parskip
。
梅威瑟:
\documentclass{article}
\usepackage{wrapfig}
\usepackage{lipsum}
\setlength{\parskip}{1em}
\begin{document}
\lipsum[1]
\begin{wrapfigure}{r}{0.5\textwidth}
\lipsum[2]
\end{wrapfigure}
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
\lipsum[3]
\end{document}
答案1
您可以指定应该较短的行的倍数:
\documentclass{article}
\usepackage{wrapfig}
\usepackage{lipsum}
\setlength{\parskip}{1em}
\begin{document}
\lipsum[1]
\begin{wrapfigure}[9]{r}{0.5\textwidth}
\lipsum[2]
\end{wrapfigure}
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
Short paragraph
\lipsum[3]
\end{document}