Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LaTeX, psfig, text alignment



>>>>> "Craig" == Craig Oda <craig@example.com> writes:

    Craig> Hi, I'm using LaTeX with the psfig package found in the
    Craig> dvips package.

    Craig> Figures are easily included with :

    Craig> \psfig{figure=filename.ps}

    Craig> My problem is that I want to have the text wrap around the
    Craig> picture and keep the margins intact.

    Craig>  +--------+  
    Craig>  | figure |  This is some text which I would  like to add to the
    Craig>  | align  |  right of a figure  aligned  to the  left  margin of 
    Craig>  | left   |  page with the rest of the text aligned to the right
    Craig>  +--------+

    Craig> Does anyone know how to do the above.  I have been
    Craig> experimenting with \mbox commands and I can do this with
    Craig> \raisebox but it is a little mendokusai.  I think there is
    Craig> an easier way.

Doing this *completely* automagically is a hard problem.  I can think
of a number of ways to do it without auto-page breaking, but I don't
know how to do with page breaking.  Furthermore, reducing column width
in this way leads to very unattractive line-breaking that often can be
improved by a human.  I think that this is why they leave it to hand
control.

If you *know* that there won't be a page break and that the figure is
taller than the text will be, just follow the figure immediately with
a "\parbox{\textwidth-\figurewidth-\spacing}{<right-side-text>}"
command or a minipage environment.  Probably the figure should be
preceded by "\noindent".  Then you can forget about it, LaTeX will do
everything.

Otherwise I would suggest an \mbox because it will warn you when the
vertical is exceeded, and you can break that sentence by hand.

If there is a page break, you're just going to have to deal with it by 
hand in any case because TeX doesn't like tall boxes (for the same
reason narrow columns are hard---TeX's algorithms are designed to
produce good output in the vast majority of cases, where you are
dealing with lots of small boxes).

    Craig> Has anyone gotten lametex to compile on Linux?

What's LameTeX and why would I care about having it?

-- 
                            Stephen J. Turnbull
Institute of Policy and Planning Sciences                    Yaseppochi-Gumi
University of Tsukuba                      http://turnbull.sk.tsukuba.ac.jp/
Tennodai 1-1-1, Tsukuba, 305 JAPAN                 turnbull@example.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links