[comp.text.tex] LaTeX: wrapping text around figures

jochterski@eagle.wesleyan.edu (02/19/91)

Hi..

I have read through the manuals, and tried various things with little success.
Is there a way to get LaTeX to wrap text around figures (esp. from PiCTeX).
I.e.:

(1)hblahblahblahblahblahblahblah
blahblahblahblahblahblahblahblah
(2)hblahblah |------------------|    Either starting point (1) or (2) is
blahblahblah |                  |    O.K.
blahblahblah |                  |
blahblahblah |     Figure       |
blahblahblah |                  |
blahblahblah |__________________|
blahblahblahblahblahblahblahblah

I know that a similar feat may be accomplished in TeX with \parshape. Does one
necessarily have to twiddle with LaTex's \linewidth? (LaTeX manual recommends
not doing that...)

Thanks.. 

dhosek@euler.claremont.edu (Don Hosek) (02/19/91)

In article <1991Feb18.145249.39052@eagle.wesleyan.edu>, jochterski@eagle.wesleyan.edu writes:
> I have read through the manuals, and tried various things with little success.
> Is there a way to get LaTeX to wrap text around figures (esp. from PiCTeX).
> I.e.:
 
> (1)hblahblahblahblahblahblahblah
> blahblahblahblahblahblahblahblah
> (2)hblahblah |------------------|    Either starting point (1) or (2) is
> blahblahblah |                  |    O.K.
> blahblahblah |                  |
> blahblahblah |     Figure       |
> blahblahblah |                  |
> blahblahblah |__________________|
> blahblahblahblahblahblahblahblah
 
> I know that a similar feat may be accomplished in TeX with \parshape. Does one
> necessarily have to twiddle with LaTex's \linewidth? (LaTeX manual recommends
> not doing that...)

The problem is very difficult to solve in a general manner; you
could use \parshape and resign yourself to having to do a lot of
manual twiddling, but it's not terribly appealing. You'll find
things are especially annoying if the figure appears near any of
the following:
- page break
- section header
- paragraph break
- list-based environment (description, itemize, enumerate, quote,
  quotation, verse, \newtheorem-generated commands, verbatim...)
Tom Reid created a general solution for plain TeX that turned out
not to be a general solution. In particular, if a footnote
appeared in the course of the rightfig, as he called it, it would
get indentation and contribute towards the line total. In LaTeX,
there are a lot of hidden things that would also complicate the
situation.

I'm pretty certain somebody tackled this problem at one of last
year's TeX meetings (TeX91 at Cork, perhaps?) but I haven't seen
any report on their findings yet.

-dh

---
Don Hosek   To retrieve files from ymir via the    | dhosek@ymir.claremont.edu
            mailserver, send a message to          | Quixote TeX Consulting
            mailserv@ymir.claremont.edu with a     | 714-625-0147
            line saying send [DIRECTORY]FILENAME 
            where DIRECTORY is the FTP directory (sans "anonymous") and 
            FILENAME is the filename, e.g. "send [tex]00readme.txt". There is
            a list of files in each directory under the name 00files.txt
            Binary files are not available by this technique.

wolf@fb14vax.sbsvax.uucp (Wolfgang Huwig) (02/21/91)

In article <1991Feb18.145249.39052@eagle.wesleyan.edu> jochterski@eagle.wesleyan.edu writes:

>I have read through the manuals, and tried various things with little success.
>Is there a way to get LaTeX to wrap text around figures (esp. from PiCTeX).
>I.e.:
>
>(1)hblahblahblahblahblahblahblah
>blahblahblahblahblahblahblahblah
>(2)hblahblah |------------------|    Either starting point (1) or (2) is
>blahblahblah |                  |    O.K.
>blahblahblah |                  |
>blahblahblah |     Figure       |
>blahblahblah |                  |
>blahblahblah |__________________|
>blahblahblahblahblahblahblahblah
>
>I know that a similar feat may be accomplished in TeX with \parshape. Does one
>necessarily have to twiddle with LaTex's \linewidth? (LaTeX manual recommends
>not doing that...)

Some time ago I tried to write some macros for LaTeX which should do
exactly what you described above. But I soon realized that it would be
really hard to integrate such line oriented processing into LaTeX.
As Don Hosek stated in another reply to your posting it would be
very difficult to handle all circumstances in which such a floating
text paragraph can appear.
Well, last week I found some time to look at the thing again and I
added a quite restricted version based on \parshape to the picture-
including front-end macros a friend and me wrote (using epsf.tex
and dvips by Tom Rokicki). It's really not a general approach but
if one takes care it gives nices results.
If someone (esp. a TeX guru) can give some advice what should be
done to make more powerfull and well-behaving floating-text macros
or give some hints where this subject has been discussed (books,
TUGboat articles etc.), I would really appreciate it. E.g. I'm
interested in a two or three column style with floating text, like
it is often used in magazines. Is there allready such a beast?
Greetings,
 Wolfgang

+-------------------------------------------------------------------+
| Wolfgang Huwig       CS Dept./AI Lab       University of Saarland |
+                             +-------------------------------------+
| Internet: wolf@cs.uni-sb.de | This space intentionally left blank |
+-----------------------------+-------------------------------------+

--
+-------------------------------------------------------------------+
| Wolfgang Huwig       CS Dept./AI Lab       University of Saarland |
+                             +-------------------------------------+
| Internet: wolf@cs.uni-sb.de | This space intentionally left blank |
+-----------------------------+-------------------------------------+