8

I'm writing a paper using SIGPLAN conference 2 columns format. I maintain separate .tex files per each chapters:

%% main.tex    
\documentclass[preprint, 10pt]{sigplanconf}
\usepackage{ ... }
...
\maketitle
...
\input{abstract}
\input{intro}
\input{related}
...

'abstract' and 'intro' together has 1.2 page long, and 'related' follows then. The length of 'related' is 0.8 page long. That means all contents until 'related are in page 2.

The problem is that I have a wide table, {table*} that spans two columns in the 'related' file.

%% related.tex
\begin{table*}[t]
\begin{center}
\begin{tabular}{|l|l|l|}
...
\end{table*}

However, this wide table is always located at page 3, not page 2. To make this wide table to be page 2, I need to move the table into the middle of 'intro', which is very ugly. Even worse, this can make the table caption numbers to be out of order.

Is there any way to enforce the location of a wide table? In my case, I want to draw the wide table at page 2.

I came across fixltx2e package, but inserting this package just makes huge errors on {table*} and {figure*}.

0

3 Answers 3

4

I have two suggestions. First, replace the \begin{center} and \end{center} commands with the single instruction \centering. This will shrink the vertical space required by the entire table quite noticeably. Second, place the code of the table in a file by itself, and \input that file immediately after the abstract but before the intro file.

In the following MWE, I'm using the article documentclass instead of sigplanconf (which isn't on my TeX system), and I'm using filler text from the lipsum package to simulate the contents of the abstract and the first two sections. Notice that the code for the table comes before the start of section 1; as a result, it gets placed at the top of page 2, which I believe is what you want. (In twocolumn LaTeX documents, floats will only be placed at the top, hence it's unnecessary, and useless, to provide the [t] positioning option.) Happy TeXing!

\documentclass[twocolumn]{article}
\usepackage{lipsum,afterpage}
\begin{document}
\begin{abstract}
\lipsum[1-2]
\end{abstract}

\begin{table*}
\caption{Some data points} \label{tab:data}
\medskip
\centering
\begin{tabular}{|ccccc|}
\hline
a & b & c & d & e\\
\hline
\end{tabular}
\end{table*}

\section{Introduction}
\lipsum[3-8]

\section{Related Literature}
\lipsum[8-15]

\end{document}
4
  • 1
    unless this has been changed with fixltx2e or some other addendum to base latex, two-column tables can't use either the b or h options. (latex manual, p.197: "Not possible for double-column figures and tables in two-column format.") i'd really like to be shown wrong! (we sometimes have two-column inserts in tugboat, and they're hacked in by hand when bottom placement is wanted; put content in a one-column box with \hss to avoid nasty messages, force it into column 1, trial-set the page, then \negative \enlargethispage` in column 2. yuck.) Sep 15, 2011 at 13:01
  • You're absolutely right, Barbara. I'm rewriting my entire answer accordingly.
    – Mico
    Sep 15, 2011 at 18:07
  • still a problem. original poster said that abstract + intro cover 1.2 pages. so the table code absolutely has to be input before the end of the intro. maybe best to put table code in a separate file, and input that file too rather than having the code physically in the section where it's referenced. (somewhat counter-intuitive, i know, but if a page starts before a table* is encountered, there's no way to avoid it being pushed off to the next page.) Sep 15, 2011 at 18:46
  • You're right! I've changed the instructions again, this time to place the table material at the start of the intro section.
    – Mico
    Sep 15, 2011 at 20:16
2

You can do this using the stfloats package and then use the normal notation such as [bp] to place the image on the bottom.

\usepackage{stfloats}
\begin{table*}[bp]
...
\end{table*}
0

Another solution is to use the [h] (for "here") modifier.

\begin{table*}[h]
   \centering
   \begin{tabular}{|l|l|l|}
      ...
\end{table*}
1
  • 4
    re [h], won't work. see comments on previous answer. Sep 15, 2011 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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