Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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

share|improve this answer
    
Harish, thanks a lot. Your solution is perfect. –  Pavel Morozkin Aug 22 '12 at 19:22
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. –  Harish Kumar Aug 22 '12 at 22:00
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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