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.

How to wrap text around a figure in LaTeX like this?

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenean quis mi ut elit interdum imperdiet quis non ante.
Sed imperdiet, sapien quis    +------------------------+
viverra rhoncus, tellus dui   |                        |
dictum nisl, at porta purus   |                        |
ipsum ac turpis. Fusce auctor |         FIGURE         |
ullamcorper adipiscing. Nunc  |          HERE          |
non quam ac orci egestas con- |                        |
sequat ut eget quam. Cras     |                        |
blandit condimentum ornare.   +------------------------+
Curabitur aliquam, nulla sit amet iaculis tristique, mi
nulla auctor magna, sit amet imperdiet ante arcu a libero.
share|improve this question

4 Answers 4

up vote 26 down vote accepted

Try the wrapfig package. The documentation in the .sty file itself says:

The "wrapfigure" and "wraptable" environments interact properly with the "\caption" command to produce proper numbering, but they are not regular floats like "figure" and "table", so (beware!) they may be printed out of sequence with the regular floats.

share|improve this answer
15  
+1. Wrapfig is the answer here, but note that it's happiest in the case the OP illustrated, of figures contained in a body of paragraph text. It (more or less unavoidably) tends to become less happy near lists, equations and the like, and I recall it needing some help near page-breaks. Short version: it does its job well, but don't obsess about the layout until nearly the final version of your document. –  Norman Gray Jul 27 '10 at 8:18
8  
@Norman "...but don't obsess about the layout until nearly the final version of your document" -- that's good advice for any *TeXed doc! –  TJ Ellis Jul 27 '10 at 9:49
    
\begin{wrapfigure}{l}{1in} \includegraphics[width=1in]{<your.eps>} \noindent \hrulefill \end{wrapfigure} \input{<yourtext>} %% that's how I had it working for a left-floating picture. –  sylvainulg Mar 23 '11 at 9:38

The floatflt package is another approach to wrap text around floats.

share|improve this answer
    
I've only made light use of wrapfig and didn't know of floatfit. Do you prefer one to the other? Any reasons that would fit into a comment? –  vanden Aug 30 '10 at 3:31
5  
floatflt has a none-free license: texcatalogue.sarovar.org/licenses.other-nonfree.html therefore it's not included in some TeX distributions (for instance TeX Live, Debian and Ubuntu repositories). I prefer wrapfig (newer, free, usually pre-installed, many options). –  Stefan Kottwitz Aug 30 '10 at 9:29

Another package I have used for this purpose is the picins package. I believe that both wrapfig and picins package have problems when used inside a list environments. They tend to mess up indents. I used to work around it by ending the list right after the item containing the figure, and starting a new list right away.

If you can, you may want to use ConTeXt instead.

share|improve this answer
    
What would you write to do this in ConTeXt? –  Will Robertson Aug 31 '10 at 10:47
    
@Will You would use \placefigure. Documentation is at wiki.contextgarden.net/Floating_Objects –  Jan Hlavacek Aug 31 '10 at 17:14

Place \usepackage{wrapfig} into the preamble.

This will take care of figure placement and also tables if you require that. The different commands being \begin{wrapfigure} and \begin{wraptable} with the obvious associated endings to close, and \includegraphics between for specification.

Place the image or table at the beginning of the paragraph and I find that simply creating an empty line works better for the wrap than \paragraph{}, on the paragraph immediately before.

Use either scale or width, height. Not both.

share|improve this answer

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.