wrapfigure
environment I don't know the number of lines in the paragraph(s) close to the image.How do I resize automatically the height and width so that the image does not end up off the page?
In this case automatically means:
I would like the height and width of the image and/or the paragraph were adapted even if I change the image.
My MWE:
Code: Select all
\documentclass[a5paper]{article}
\usepackage[demo]{graphicx}
\usepackage{wrapfig}
\usepackage{blindtext}
\begin{document}
\large
\section*{First section}
\blindtext
%\begin{wrapfigure}{l}{5cm}
\begin{wrapfigure}[8]{l}{5cm}
\includegraphics[width=4.9cm]{test}
\caption{Test figure}
\end{wrapfigure}
\blindtext
\end{document}
If I use the commented
wrapfigure
environment, then on the next page I still wrapping! 
Thank you for your attention!