You have to carefully adjust the dimensions of your image and the number of lines the wrap figure will extend ( for example [10]
in \begin{wrapfigure}[10]{r}{5.5cm}
).
An example:
\documentclass{article}
\usepackage{graphicx,wrapfig,lipsum}
%------------------------------------------
\begin{document}
This is where the table goes with text wrapping around it. You may
embed tabular environment inside wraptable environment and customize as you like.
%------------------------------------------
\begin{wrapfigure}[10]{r}{5.5cm}
\rule{5.5cm}{7.1cm}
\caption{A wrapped figure}\label{wrap-fig:1}
\end{wrapfigure}
%------------------------------------------
This is where the table goes with text wrapping around it. You may
embed tabular environment inside wraptable environment and customize as you like. This is where the table goes with text wrapping around it. You may
embed tabular environment inside wraptable environment and customize as you like. This is where the table goes with text wrapping around it.
%
\begin{figure}[h]
\begin{minipage}{6cm}
\centering
\rule{\textwidth}{3cm}
\caption{my figure}\label{fig:2}
\end{minipage}%
\end{figure}%
\lipsum[2-3]
Figure~\ref{wrap-fig:1} is a wrapped figure.
%------------------------------------------
\end{document}

In general with floats, the best approach for me is do not care of where is finally placed the image until the final version, but take care that it is always referenced when is really relevant (i.e, see fig. \ref{keylabel}
) as sometimes simply the image cannot be placed just here.
In the final draft, then move floats some paragraphs above/below solve most problems, and as last resource one can fix the float options, but being as permissive as possible, especially when you have a lot of floats. As more restrictive you are with floats, more problems you will find later.
Said that, for this edge case (the figure must be in a paragraph that have a page break, with no enough space in the first page) this is a dirty hack for the very final version only: split the paragraph in two parts just where the page break should be, taking care of hiding that to the reader (fill the last line of the first part and avoid indentation of the first line of the second part). Then take care that the wrap figure take enough vertical space, so that the second part of the paragraph do not take a extravagant shape (the [14]
option, although in this MWE work equally without that).

\documentclass[14pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
\section{Example}
\lipsum[1-2]
\lipsum[1-1]
{\parfillskip=0pt
Nunc id nulla nec mauris iaculis rutrum. Nunc nisl. Integer mi.
Praesent lorem neque, egestas at, molestie in, faucibus et, eros.
Sed rutrum, ante vitae aliquet tincidunt, diam elit auctor risus,
eu elementum purus turpis eu elit. Proin ac orci. Integer varius,
urna non sollicitudin consequat, massa libero pharetra erat, et ve-
nenatis dui orci eget purus. Aliquam iaculis est eget ipsum. Ut
volutpat velit. Phasellus fringilla. Aliquam mollis tellus vel odio.}
\begin{wrapfigure}[12]{r}{70mm}
\includegraphics[width=\linewidth]{example-image}
\caption{Melting Energy}
\label{figur:NH2}
\end{wrapfigure}
\noindent Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia Curae; Vestibulum gravida sapien sed diam dic-
tum pharetra. Nulla ac odio. Duis vitae metus ut purus feugiat
interdum. Duis eros enim, tincidunt ac, venenatis et, dignissim id,
lacus. Curabitur sagittis dolor nec augue. Sed ultricies mauris.
Donec semper, enim eu vestibulum placerat, justo risus eleifend
quam, ac semper velit pede convallis arcu.
\subsection{WrapFigur Test}
\lipsum[1-4]
\end{document}
Best Answer
I suggest not to use the
figure
environment in a presentation, since its purpose is to let the picture freely float, which is not what you want in a presentation; trying to fix it withH
contradicts the reason for usingfigure
. Moreover, numbering figures and referring to them via\label
doesn't make much sense in a presentation either, since the audience does not remember the images by number (in fact, figures do not even get numbered inbeamer
). Therefore I suggest to do it like this:If you want to introduce the caption with an emphasized 'Figure' to obtain the old look, just define
\mycaption
as:I wouldn't do it, since everyone sees that it is a figure, and there is also no reason to draw the attention of the audience to the word 'figure'.
Edit: Originally, I didn't notice the second question regarding positioning the image to the left. There are several ways how you can organize the material. You can put the image and caption into a
tabular
:and then position it side-by-side with a box containing further text. Or you can use
columns
, like this: