[vox-tech] latex: flowing around text

Peter Jay Salzman vox-tech@lists.lugod.org
Tue, 3 Feb 2004 07:56:45 -0800


hi all,

occasionally i'll find a google groups link that's so useful that it'll
come up again and again in my searches.  i happen to know that we have a
few more latex users here than we did a couple of years ago, so i'm
posting this in hopes that it'll be as useful to other people as it has
been for me.  this is a truly wonderful post:

http://www.google.com/groups?q=flow+around+text+group:comp.text.tex&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3unt1u%24i3r%40krant.cs.ruu.nl&rnum=1

the guy compares and contrasts different ways of getting text to flow
around floats.

the reason why this is so noteworthy is:

1. the topic is not mentioned in the lamport book.

2. the topic is covered in the companion book, but the information is so
   old that it's wrong.  for example, my hat is off to anybody who
   actually gets parpic to work well...


fwiw, i've found that picins is the best solution for wrapping text
around a float.  here is an example of picins in use:

   \usepackage{epic,eepic,picins}

   \parpic{%
   \begin{picture}(150,50)
   \put(5,10){\vector(2,3){20}}
   \put(5,25){$\vec{A}$}
   \put(28,20){$+$}
   %
   \put(55,13){\vector(-1,2){10}}
   \put(54,23){$\vec{B}$}
   %
   \put(75,20){$=$}
   %
   \put(100,0){\vector(2,3){20}}
   \put(113,8){$\vec{A}$}
   \put(121,30){\vector(-1,2){10}}
   \put(118,38){$\vec{B}$}
   \put(98,0){\vector(1,4){12}}
   \put(93,22){$\vec{C}$}
   \end{picture}%
   }%
   %
   The rule for adding vectors in geometric notation is: Put the two
   vectors `heel to toe', and then draw an arrow that goes from the heel of
   the first vector to the toe of the second vector.  In the diagram to the
   left, when you add $\vec{A}$ and $\vec{B}$, you get $\vec{C}$.


works very well.  a couple of notes:

1. the "%" characters are comment characters.  they help avoid
   extraneous newlines.

2. don't use epic without using eepic.  vectors/lines that aren't
   horizontal, vertical or 45 degrees come out MUCH better drawn.

pete

-- 
Make everything as simple as possible, but no simpler.  -- Albert Einstein
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D