# Moving a subsection directly under an image using wrapfigure, how to remove the white space

I have read and tried solutions from various answers, but I haven't reached a solution to my problem; In my document I have an image on the left side, and an equation right next to the image on the right side, followed by a new section under the image and the equation.

\documentclass[12pt][report]
\usepackage{graphicx}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wrapfig}

\begin{document}

\subsubsection{My first section}
\begin{wrapfigure}{l}{0.40\textwidth}
\centering
\includegraphics[width=0.40\textwidth]{triangular.png}
\caption{Triangular MF}
\end{wrapfigure}

$$triangle(x; a,b,c)=\begin{cases} 0, x<a.\\ \dfrac{x-a}{b-a}, a \leqslant x \leqslant b.\\ \dfrac{c-x}{c-b}, b \leqslant x \leqslant c.\\ 0, c \leqslant x \end{cases}$$

\subsection{A section the goes directly under the image}

\end{document}


However, there seems to be too much whitespace under my image on the left side of the page, and my section is written to the right side.

I tried using \begin{wrapfigure}[3]{L}{0.40\textwidth}, and it works well when there is normal text beneath the image, but when it comes to putting the section directly under the image, it doesn't work.

How can I position my section directly under the image and it's caption? or how can I remove the white space under the image and continue writing normally, from left to right?

• A warm welcome to TeX.SE! Your example should, when cut and pasted into another TeX editor, compile. It sadly does not. Please add the missing code, including the document class and any packages needed to compile. – A Feldman Jun 7 '16 at 17:07
• – Rmano Jun 7 '16 at 17:45
• It does not yet compile. Probably missing something... – A Feldman Jun 7 '16 at 23:48