46

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.

4 Answers 4

33

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.

3
  • 19
    +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. Jul 27, 2010 at 8:18
  • 15
    @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, 2010 at 9:49
  • 2
    \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, 2011 at 9:38
5

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

2
  • 1
    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, 2010 at 3:31
  • 7
    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, 2010 at 9:29
3

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.

2
3

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .