2

I have a two column format for an article and a small paragraph which i want to split in those 2 columns(hard break). I dont want to use \vfill, as I am intending to display a table after the paragraph. Any ideas how to do it?

\documentclass{article}    
\usepackage[margin=2cm]{geometry}    
\usepackage{lipsum}    
\usepackage{supertabular}    
%\makeatletter% Set distance from top of page to first float    
%\setlength{\@fptop}{5pt}    
%\makeatother    

\begin{document}    
\twocolumn[]    
\lipsum[1-1]    
\begin{table*}[ht]    
\caption{Caption}    
\center    
\begin{supertabular}{c c c c c}    
\hline \hline    
A & B & C & D & E\\    
\hline    
1 & a & A & D & E \\     
2 & b & B & D & E\\    
3 & c & C & D & E\\    
4 & d & D & D & E\\    
5 & e & E & D & E\\    
6 & f & F & D & E\\    
7 & g & G & D & E\\    
8 & g & G & D & E\\    
9 & g & G & D & E\\    
10 & g & G & D & E\\    
11& g & G & D & E\\    
12 & g & G & D & E\\    
13 & g & G & D & E\\    
14 & g & G & D & E\\    
\hline    
\end{supertabular}    
\end{table*}    
\end{document}   
3
  • 1
    Any code you can show us? Document class? Other relevant packages loaded?
    – Mensch
    Commented Oct 11, 2015 at 13:37
  • your question is not very clear, in particluar if you add the table, why does it not break in the correct place automatically? But \pagebreak possibly does what you want Commented Oct 11, 2015 at 13:39
  • I don't understand your question, but maybe the multicol-package offers some support for your problem.
    – knut
    Commented Nov 11, 2015 at 22:16

1 Answer 1

1

As I understand it, in a twocolumn document, you want the paragraph in 2 columns directly followed by the table, which spreads across both columns (is 'wide' due to the *).

If that's right, then you have to contend with the following limitation: in two-column format, a 'wide' (starred) float (figure, table etc.) must always occur at the top of a page. It cannot be placed 'here' or at the bottom. Hence the h specifier does nothing. t (or p) are the only effective options.

So, the only way I can see to have the paragraph come before the table and be on the same page is if the paragraph is included inside the table* environment.

But, if we do that, then it will default to one-column mode. So, we need to do something special to get this particular paragraph into two-column mode.

I didn't expect this to work, but it turns out that multicol's multicols environment works quite happily inside the table* environment, even if the document is in two-column mode.

\documentclass[twocolumn]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{lipsum}
\usepackage{supertabular,multicol}
\begin{document}
\begin{table*}
  \begin{multicols}{2}
    \lipsum[1]
  \end{multicols}
  \caption{Caption}
  \centering
  \begin{supertabular}{c c c c c}
    \hline \hline
    A & B & C & D & E\\
    \hline
    1 & a & A & D & E \\
    2 & b & B & D & E\\
    3 & c & C & D & E\\
    4 & d & D & D & E\\
    5 & e & E & D & E\\
    6 & f & F & D & E\\
    7 & g & G & D & E\\
    8 & g & G & D & E\\
    9 & g & G & D & E\\
    10 & g & G & D & E\\
    11& g & G & D & E\\
    12 & g & G & D & E\\
    13 & g & G & D & E\\
    14 & g & G & D & E\\
    \hline
  \end{supertabular}
\end{table*}
\end{document}

2-col paragraph and 1-col table in 2-col document

If you would like to improve the appearance of the table itself, the booktabs manual is a source of useful guidance. That package gives us some nicer spacing around rules of different weights, as used in professional-quality typesetting of tables.

Adding that package, we can write

  \begin{supertabular}{c c c c c}
    \toprule
    A & B & C & D & E\\
    \midrule
    1 & a & A & D & E \\
    2 & b & B & D & E\\
    3 & c & C & D & E\\
    4 & d & D & D & E\\
    5 & e & E & D & E\\
    6 & f & F & D & E\\
    7 & g & G & D & E\\
    8 & g & G & D & E\\
    9 & g & G & D & E\\
    10 & g & G & D & E\\
    11& g & G & D & E\\
    12 & g & G & D & E\\
    13 & g & G & D & E\\
    14 & g & G & D & E\\
    \bottomrule
  \end{supertabular}

to produce

improved table

Adding some more 'lipsum' text, the page layout looks something like this:

2-1-2

Note that this will not work if you want the paragraph and table on the first page of the document, as they will automatically be floated to the next page, even if they are first in the source. I'm guessing that is not required simply because people usually have at least a title first and you seem to want the paragraph to be the first thing on the page.

If you did want this as the first thing, then things are a bit more complex, but I think you could specify it in the optional argument to \twocolumn, removing the table* environment and using \captionof from caption in place of \caption.

\documentclass[twocolumn]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{lipsum}
\usepackage{supertabular,multicol,booktabs,caption}
\begin{document}
\twocolumn[%
  {%
    \begin{multicols}{2}
      \lipsum[1]
    \end{multicols}
    \captionof{table}{Caption}
    \begin{center}
      \begin{supertabular}{c c c c c}
        \toprule
        A & B & C & D & E\\
        \midrule
        1 & a & A & D & E \\
        2 & b & B & D & E\\
        3 & c & C & D & E\\
        4 & d & D & D & E\\
        5 & e & E & D & E\\
        6 & f & F & D & E\\
        7 & g & G & D & E\\
        8 & g & G & D & E\\
        9 & g & G & D & E\\
        10 & g & G & D & E\\
        11& g & G & D & E\\
        12 & g & G & D & E\\
        13 & g & G & D & E\\
        14 & g & G & D & E\\
        \bottomrule
      \end{supertabular}
    \end{center}
  }%
]

\lipsum[2-20]
\end{document}

2-1-2 first off

Note that \centering is a switch. center is an environment. So usually you want \begin{center}...\end{center} or \centering. In a float, the latter is usually preferable. \center works because the environment internally uses \center and \endcenter. But you don't normally want to use this at the document level.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .