8

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}
3

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

  • 1
    @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 '12 at 22:00
0

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.

In addition, this link might be helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.