I have two problems and one additional question.
First problem
The figure wrapping does not work well, the text top and the top of the figure does not align perfectly, there is one extra line. How could could I prevent this?
Second problem
As you can see on the second page, there is gap in the text, I do not want it.
Addition question
Is there a way that, the latex recognize, there is not enough space for the picture, than the figure and the text will start at the top of the page.
Addition information
As you can see, I am using scale=0.35, because there are more than one figure and I want to keep the same scale on each figure and each figure have different width and height.
Code
\documentclass{report}
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
%----------------------------------------------------------------------------
\chapter{Lorem}
%----------------------------------------------------------------------------
%----------------------------------------------------------------------------
\section{Lorem}
%----------------------------------------------------------------------------
\begin{wrapfigure}{l}{\wd0}
\centering
\includegraphics[scale=0.35]{example-image}
\end{wrapfigure}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut
\begin{wrapfigure}{l}{\wd0}
\centering
\includegraphics[scale=0.35]{example-image}
\end{wrapfigure}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,
\end{document}
Screenshot


begin{wrapfigure}{l}{\wd0}makes the cut in as wide as box0 but you have not set box 0 so this is a completely arbitrary value???? – David Carlisle Dec 21 '22 at 12:18\begin{wrapfigure}{l}, the I cannot use\centering, and if I do not use\centeringthen the figure does not appear on the screen. – mala97 Dec 21 '22 at 12:22{0pt}which is a special value to mean "as wide as the figure" You get that accidentally here as box0 happens to be empty in this example so\wd0is 0pt – David Carlisle Dec 21 '22 at 12:26\newpagecommand. But the figure should be on the left part of the page. – mala97 Dec 21 '22 at 18:06