使用 Lyx 的 classicthesis 将图像 (wrapfigure) 放在文本末尾

使用 Lyx 的 classicthesis 将图像 (wrapfigure) 放在文本末尾

我经常使用classicthesis。然而,现在我遇到了一个以前从未见过的问题。每当我添加 时wrapfigure,图像就会在文本块末尾不换行地显示。这是 LyX 创建的代码:

\clearpage{}

\begin{addmargin}[-11mm]{-31mm}

\begin{wrapfigure}{l}{0.3\columnwidth}%
\includegraphics{../test}
\end{wrapfigure}%

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 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{addmargin}

这是创建的 PDF 的屏幕截图: 在此处输入图片描述

该函数与普通文章(标准类)配合得很好。因此,我认为这是由于addmargin。如果是这样,我如何避免这种不当行为,但addmargin在这里使用 。或者:如何解决这个问题?

\documentclass{scrartcl}

\usepackage{wrapfig,graphicx}
\begin{document}

\begin{addmargin}[-11mm]{-31mm}

\begin{wrapfigure}{l}{0.3\columnwidth}%
\includegraphics[width=.25\columnwidth]{example-image}
\end{wrapfigure}%

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 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{addmargin}
\end{document}

答案1

此解决方案使用负数\hspace和 aminipage代替\addmargin。它不会跨页中断,但也不会混淆那么多包。

顺便说一句,我认为 -31mm 是打字错误,因为它超出了页面范围。

\documentclass{scrartcl}
\usepackage{wrapfig,graphicx}
\usepackage{showframe}% MWE only

\begin{document}

\noindent\hspace{-11mm}\begin{minipage}{\dimexpr \textwidth+22mm}

\begin{wrapfigure}{l}{0.3\columnwidth}%
\includegraphics[width=.25\columnwidth]{example-image}
\end{wrapfigure}%

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 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{minipage}\hspace{-11mm}

\end{document}

相关内容