[Tuglist] Floats and multicols

Radhakrishnan CV tuglist@tug.org.in
Tue, 15 Jan 2002 18:53:31 +0530 (IST)


On Tue, 15 Jan 2002 at 16:36, Ajay Shah wrote:

multicol.sty and single column floats will not go together.
   
   I would be most happy to have help on any of the two fronts:
   
     * How to obtain floating boxes using plain latex (in which case I'd
       use \twocolumn), or

Here is a macro that will float your material in a single column if 
you use native twocolumn option in LaTeX:

\makeatletter
\newsavebox\ruledbox
\newlength \ruledlength
\ruledlength\linewidth 
  
\newenvironment{ruledfloat}
 {\fboxsep6pt
  \setlength\ruledlength{\linewidth-2\fboxsep-2\fboxrule}
  \begin{lrbox}{\ruledbox}
   \begin{minipage}{\ruledlength}
   \def\@captype{figure}}
 {\end{minipage}\end{lrbox}
  \@float{figure}[tbp]
   \fbox{\usebox{\ruledbox}}
  \end@float}

\def\endcolumn{\parfillskip=0pt\par\newpage
   \noindent\parfillskip=0pt plus 1fil{}}
\makeatother

\endcolumn is to balance the two columns in the last page. If you 
use in the appropriate line along with \vadjust, balanced columns 
are not painful in two column format. The above macros need calc.sty 
package.

You can write your own macro by modifying the \@float{figure} in the
above code to \@float{figure*} to span your float to two columns.
Change linewidth to \textwidth.

     * How to make float.sty speak to multicol.sty and support
       the table* or figure* style floats which span columns.
   
I have not looked into that, I will give a try when I get time and 
let you know.

-- 
Radhakrishnan

PS: Ajay: I've send separately a specimen TeX doc.