Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to make a table around which text in both columns will wrap. I've looked around and wraptable from wrapfig has been suggested, but it seems to just make things worse.

\documentclass[twocolumn]{article}

\usepackage{blindtext} %for lorem ipsum
\usepackage{wrapfig}

\begin{document}
\blindtext[1]

\begin{wraptable}{l}{10cm}
    \begin{tabular}{lp{8cm}}
    X & Y \\ 
    \hline \\[-2mm]
    AAAA & \Blindtext[1][1]  \\
    CCCC & x
    \end{tabular}
\end{wraptable}

\blindtext[3]

\end{document}

enter image description here

share|improve this question
2  
twocoulmn is somewhat rigid. Are you after wide tables spanning both the columns? If so, you may use table*. If you want wrapping then this answer may be somewhat useful -- tex.stackexchange.com/a/70169/11232 –  Harish Kumar Jan 17 '13 at 2:21
    
@HarishKumar I'd be happy with either a table spanning both columns at the bottom or top of the page if necessary) or partially spanning both columns. It should be on the same page that it is called. –  sebastian-c Jan 17 '13 at 2:31
    
But table* can't be put in the first page. On other pages, it should be possible –  Harish Kumar Jan 17 '13 at 2:43
add comment

1 Answer 1

up vote 3 down vote accepted

twocoulmn is somewhat rigid. If you want wide tables spanning both the columns, you may use table*. But it can't be put in the first page of the document. In other pages you can place them on top or bottom. If needed, you may use placeins package and its FloatBarrier to restrict the placement. There is also float package with similar functionality ([H] instead of [htb]. Or you may issue a \clearpage by yourself.

\documentclass[twocolumn]{article}

\usepackage{lipsum} %for lorem ipsum
\usepackage{placeins} % provides \FloatBarrier 

\begin{document}

\lipsum[1-20]

\begin{table*}[t]
\centering
   \begin{tabular}{lp{8cm}}
    X & Y \\ 
    \hline \\[-2mm]
    AAAA & \lipsum[1]  \\
    CCCC & x
    \end{tabular}
\end{table*}
%\FloatBarrier To force the table here if needed.
\lipsum

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.