# Two figures side by side with text wrapping

I have a problem with text wrapping around two figures side by side, each of which has a different height. Look at the required template below.

Currently I placed two pictures with minipage environment. But how can I combine it with the wrapfigure environment to get the required result? Or maybe there are other solutions?

Currently i use this simple code:

\documentclass{article}
\usepackage{wrapfig}
\usepackage{xcolor}
\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{figure}[h]
\begin{minipage}[t]{0.5\linewidth}
\centering
\textcolor{blue}{\rule{3cm}{3cm}}
\caption{A}
\label{fig:A}
\end{minipage}
\begin{minipage}[t]{0.5\linewidth}
\centering
\textcolor{blue}{\rule{5cm}{8cm}}
\caption{B}
\label{fig:B}
\end{minipage}
\end{figure}

\lipsum[2]

\end{document}


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}


• @PavelMorozkin: If this solved your problem, you may consider upvoting it and accept it by clicking the green check mark below the vote count so that the question can be concluded.
– user11232
Aug 22, 2012 at 22:00

Maybe this can be helpful for you:

\usepackage[dvips]{graphicx}
\usepackage{floatflt,epsfig}

\begin{document}
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
\begin{floatingfigure}[r]{9cm}
\mbox{\includegraphics[width=80mm,height=61mm]{bild.eps}}
\caption{bla}
\end{floatingfigure}
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
\end{document}


If not, please post the code you used until now to solve your problem.