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 want a table that is as wide as the whole page in a document with option twocolumn. The table has to be inserted on the bottom of the page, but that is not necessary.

I've tried:

\begin{table*}[b]
  ...
\end{table*}

But that puts the table at the end of the document instead of on the same page. I also tried:

\twocolumn[
  \begin{table}[b]
    ...
  \end{table}
]

But that gives me an error: ! Argument of \@xfloat has an extra }. Combining \twocolumn and the star mark gives the same error.

What's the right way to do this?

share|improve this question
add comment

1 Answer 1

up vote 15 down vote accepted

For table* and figure*, the only available options are t (top of next page) or p (end of document). b and h have been disabled on purpose, there is probably a strong typographical reason behind it.

Since you state that the placement on the bottom of the page is "not necessary", I suggest you use the [t] option instead of [b].

Note that the table may appear one the next page instead of the current one. If you really need to control on what page the table is, you may have to move the table definition up in the source code.

MWE

\documentclass[twocolumn]{article}

\usepackage{lipsum}

\begin{document}

\lipsum[1-10] % To create a random first page

\lipsum[1-3]

[Location of the table in source code]

\begin{table*}[t]
  \centering
  \begin{tabular}{lcr}
    1 & 2 & 3 \        4 & 5 & 6 \        7 & 8 & 9
  \end{tabular}
  \caption{Blabla}
  \label{tab:1}
\end{table*}

\lipsum[1-6]

\end{document}

The table will be on the third page, you'd have to move it up the code to get it in 2nd page.

Further reading: How to influence the position of float environments like figure and table in LaTeX?

share|improve this answer
1  
[t] includes this page not just following pages (unless you use flafter package) so the note above about moving the source code should not be needed. –  David Carlisle Jan 5 '13 at 15:15
1  
@DavidCarlisle : I'm not sure to understand what you mean, but I included a MWE as an example for the need to move the table in source code. If I remember correctly, the problem is not that the float is placed on the next page, but rather that (as any float) it is placed after its location in the source code. So as a result, if we ask that place to be the top of a page, it is necessarily the next one (except maybe if the table is the very first thing to appear in the page). –  T. Verron Jan 5 '13 at 15:49
1  
Your statement "but rather that (as any float) it is placed after its location in the source code. " is what I was referring to, LaTeX by default does not do that, floats may appear before their position in the source code (not on earlier pages, but they can appear at top of the current page). –  David Carlisle Jan 5 '13 at 15:52
1  
Hmm what I say is true for one column (take your example without [twocolumn] and you will see the figure appear before its source position) In two column I think it is supposed to work if the source appears in the first column (if it appears in the second column it is too late to change the height of the first column) but actually on this example the figure doesn't move unless you move the source to the first page. hmmmm –  David Carlisle Jan 5 '13 at 16:03
1  
@DavidCarlisle : That's why your comment surprised me : I have had lots of trouble with double-column floats in the past months, but I never saw any appearing on the current page. Anyway, that doesn't mean it is impossible, so I editted the answer to avoid any confusion. –  T. Verron Jan 5 '13 at 16:05
show 2 more comments

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.