[Tex/LaTex] Two figures side by side with text wrapping

formattinggraphics

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.

enter image description here

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}

Best Answer

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}

enter image description here

Related Question