在投影機中,wrapfig 沒有正確斷行

在投影機中,wrapfig 沒有正確斷行

我有一個非常簡單的情況,wrapfig沒有正確選擇換行位置。這是 MWE:

\documentclass{beamer}
\usepackage{wrapfig}
\begin{document}
\begin{frame}
\begin{wrapfigure}{R}[5pt]{0.52\textwidth}
\framebox{THIS IS MY FIGURE}
\end{wrapfigure}
This is not wrapped properly, I think.

Here is some more text.
\end{frame}
\end{document}

這是輸出:

在此輸入影像描述

您可以看到第一行文字在單字“is”之後提前結束。如何確保文字在每行的正確位置換行?

也許相關:我希望該圖形顯示在與第一行文字相同的高度,而不是第二行。

答案1

投影機「頁面」是一個相當特殊的環境,很多東西不能像普通類別中那樣運作。您可以嘗試新增額外的小頁,用 r 取代 R 並更改 \intextsep:

\documentclass{beamer}
\usepackage{wrapfig}

\begin{document}
\begin{frame}
\begin{minipage}{\linewidth}\intextsep=0pt
\begin{wrapfigure}{r}[5pt]{0.52\linewidth}
\framebox{THIS IS MY FIGURE}
\end{wrapfigure}
This is not wrapped properly, I think.

Here is some more text.
\end{minipage}
\end{frame}
\end{document}

在此輸入影像描述

但我會在beamer中使用列而不是wrapfig。

相關內容