[texhax] wrapfig and subsection headers?

Steve Schwartz s.schwartz at imperial.ac.uk
Sun Jul 29 15:55:27 CEST 2007


Will,

Not exactly the help you might be looking for, but you might try picins
instead of wrapfig. I append a previous posting of mine, though, that
shows similar problems with figures and list environments (which wrapfig
doesn't do at all, and which is why I use picins). Perhaps it will
behave better with sectioning though. I've tried to chase the authors of
picins, but they are no longer reachable. 

My use of this kind of thing suggests it is an area where a real texpert
is needed to improve on Latex's handling of figures. On my wish list
are:

* a modern equivalent to picins

* a version of multicol that can handle floats

Regards,
Steve

-------------------------------------------------
To: texhax <texhax at tug.org>
Subject: picins bug
Date: Sat, 18 Feb 2006 17:07:08 +0000
I am using the picins package to flow text around a figure. It has the
advantage over others (wrapfig and floatflt) that it works within list
environments. However, the attached example shows that it does not
properly restore the list indentation if used in only one of the list
items. The one following the picins is ok, but the 2nd and subsequent
after that is incorrect. In two-column mode, even the 2nd item doesn't 
get indented properly.

I have a workaroud, which is to put a blank \parpic at the end of each
following item. That adds a bit of vertical space but is otherwise ok.
Another workaround would be welcome.

It would seem that the author of this package is not traceable, and the
code too dense for me to figure out what is going wrong. Has someone
else hit/solved this? It's an old (latex209?) package; version 3.0.

Cheers,
Steve

--------------------

\documentclass{article}
\usepackage{graphicx,picins}

\newcommand{\longtext}{Here is some long long text. Here is some long
text. Here is some long text. Here is some long text. Here is some long
text. Here is some long text. Here is some long text. Here is some long
text. Here is some long text. Here is some long text.}

%\twocolumn
\sloppy

\begin{document}

This demonstrates an apparent bug in picins in connection with a
list-making environment. The first example illustrates the bug.

\begin{itemize}

\setlength{\unitlength}{1mm}
\parpic[rf]{\begin{picture}(10,30)\put(0,4){HELP}\end{picture}}

\item{}  \longtext
\item{}  \longtext
\item{}  \longtext
\item{}  \longtext
\item{}  \longtext

\end{itemize}

Note the incorrect indentation in the 3rd item, which is apparently
related to something parpic does that doesn't affect the 2nd. The next
example has a parpic in each item, and works ok.

\begin{enumerate}

\setlength{\unitlength}{1mm}

\item{} \parpic[rf]{\begin{picture}(10,10)\put(0,4){HELP}\end{picture}}
\longtext

\setlength{\unitlength}{1mm}  % this seems to need to be re-set each
time

\item{} \parpic[rf]{\begin{picture}(10,10)\put(0,4){HELP}\end{picture}}
\longtext

\setlength{\unitlength}{1mm}

\item{} \parpic[rf]{\begin{picture}(10,10)\put(0,4){HELP}\end{picture}}
\longtext

\end{enumerate}

End of test.

\end{document}


On Sat, 2007-07-28 at 23:52 -0400, Will Ray wrote:
> I hate to bother the group with what is probably a FAQ, but I can't 
> seem to figure out the right query with which to google up an answer. 
> 
> 
> I'm trying to wrapfig some figures, currently using wrapfig 3.6. 
> 
> In some cases these are obliged to wrap subsection* headings. 
> The behavior that I'm seeing is that if one does, thereafter, _all_ 
> subsection* or subsection headings are wrapped to the same 
> (shortened) width, as are the first n lines of all subsequent 
> paragraphs. 
> 
> If I replace the subsection* with, ie \textbf, everything 
> works fine.  If I force the wrapfig to not overlap the subsection* 
> heading, everything works fine, or at least more as expected. 
> 
> If I call a zero-width wrapfig after the end of the paragraph that 
> _should_ be wrapped, everything pops back into proper alignment. 
> This would almost be an acceptable hack, except in places where 
> I have the wrapfig running beside a series of shorter paragraphs, 
> where I'd have to pick the right line-break internal to the right 
> paragraph to "unwrap" at (because all shorter paragraphs, being 
> less than the wrapping height of the wrapfig, now all wrap, even 
> when they're not beside the wrapfig. 
> 
> Manual placement, or floated placement does not seem to affect 
> the outcome. 
> 
> Any pointers to either what I'm doing wrong, or where I can find 
> a workable solution, would be most appreciated. 
> 
> Will Ray 
> 
> 
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list