I tried to use wrapfigure, and I had some problems.
After compiling I got
The text of this picture was:
\begin{wrapfigure}{R}{0.5\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{reactdvig.png}
\caption{\label{fig:frog1}This is a figure caption.}
\vspace{-\baselineskip}
\end{wrapfigure}
I disliked at all these blank spaces, so I googled and I found that I need to put ~\vspace{-\baselineskip} after \end{wrapfigure}. Unfortunately, I got
So nothing is good, I have formulas on place, which is devoted to space between picture and caption.
How can I make it working properly? Why I have such problems? Is wrapfigure so undeveloped, or I just don't know how to use it?
Thanks in advance.


wrapfiguredoes not work well across multiple paragraphs. – Zarko Aug 05 '20 at 19:34