How to clear after floating images in LaTeX?

I am trying to convert floating images to text in LaTeX using the following code:

\begin{wrapfigure}{R}{0.5\textwidth}
\begin{center}
\includegraphics{images/image.png}
\caption{This is the caption.}
}
\label{fig:image1}
\end{center}
\end{wrapfigure

This works great in most cases (creating an image that floats on the right side), but sometimes LaTeX doesn't clean up correctly after the image and it leaves an open column for another page or two. How can I fix this or, ideally, make LaTeX a function similar to clear: bothCSS?

There is a team \clearpage, but it is not suitable when there is no natural place to go to a new page next to the image.

+5
source share
2 answers

, wrapfigure

\begin{wrapfigure}[lineheight]{alignment}{width}

lineheight - , .

+3

, wrapfigure . figure , . - , , :

\begin{figure}
\begin{center}
\includegraphics{images/image.png}
\caption{This is the caption.}
\end{center}
\label{fig:image1}
\end{figure}
-2

All Articles