![将图片插入文本](https://linux22.com/image/394388/%E5%B0%86%E5%9B%BE%E7%89%87%E6%8F%92%E5%85%A5%E6%96%87%E6%9C%AC.png)
答案1
Overleaf 遵循默认的 wrapfig 包规则,图像占 \textwidth 的 20% 还是 80% 并不重要。每次只显示一个图像和相邻的段落,如果段落在标题清除之前结束,则允许另一个段落与该段落一起显示,因此如果空间不足,下一个图像将浮动到下一个段落或 overleaf 到下一页。通常,您只能控制尝试的段落位置。
规则是第二个 wrapfig 才会开始......
“如果该段落没有围绕另一个图形”
\documentclass{article}
%\usepackage{mwe} % may be required one time to trigger on the fly example-image downloads
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
FIRST we have text and here we have text and here we have text and here we have CITIES continues
% implied end paragraph still needs
\par
\begin{wrapfigure}{l}{0.45\textwidth}
\centering
\includegraphics[width=0.45\textwidth]{example-image-A}
\caption{Frankfurt am Main, DE}
\end{wrapfigure}
FRANKFURT we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text AND\par SECOND FRANKFURTwe have text and here we have and here we have text and here we have text and here we have text AND
\newline
\par
CHICAGO we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have text and here we have AND \par
\begin{wrapfigure}{r}{0.49\textwidth}
\centering
\includegraphics[width=0.49\textwidth]{example-image-duck}
\caption{Chicago, USA}
\end{wrapfigure}
SECOND CHICAGO we have text and here we have and here we have text and here we have text and here we have text AND continues...
\par
\end{document}