1

Say I have the following table:

\documentclass{report}

\usepackage[intlimits]{amsmath}     
\usepackage{floatflt}
\usepackage{caption}
\usepackage{listliketab}
\usepackage{booktabs}

\begin{document}
\begin{table}[htbp]
    \centering
    \caption{This is a test table}
    \label{tab:test}
    \begin{tabular}{cl}
    \toprule
    Letter & Stuff \\ \midrule
    A & 1 \\
    B & 2 \\
    C & 3 \\
    D & 4 \\
    E & 5 \\
    F & 6 \\
    G & 7 \\
    H & 8 \\
    I & test \\
    J & test2\\
    K & test3 \\
    \bottomrule
    \end{tabular}
\end{table}
\end{document}

Result

I would like this table to split itself in half and to be next to each other, maybe using minipages. A photoshop for better explanation: Photoshop

The reason I want to do this instead of just making 4 columns is, that this is supposed to be an alphabetically sorted table that I will add stuff to over time. I can't do this with more columns.

8
  • With other words: Finally there might be two tables aside with at most 13 rows? (Assuming standard 26 letters alphabet?) – user31729 May 21 '15 at 21:24
  • @PhilNope you can put two tabular environments into table environment. Then, control the space between tabulars with \hspace command – juanuni May 21 '15 at 21:35
  • The amount of rows is not limited. I want the table to dynamically "wrap" to the right. Similar to Word if you create a environment of two columns in a page. – Phil Nope May 21 '15 at 21:36
  • @juanuni: I think the real question here is the automatically splitting at half of the rows – user31729 May 21 '15 at 21:38
  • 2
    You can use the supertabular environment in two columns. The documentation is here ctan.yazd.ac.ir/macros/latex/contrib/supertabular/…. – AboAmmar May 21 '15 at 21:41
0

You can try something like this:

\documentclass{report}
\usepackage{supertabular,booktabs}

\begin{document}
\twocolumn
\begin{center}
\tablehead{%
\toprule\multicolumn{1}{l}{Letter} & \multicolumn{1}{l}{Stuff} \tabularnewline \midrule}
\tablelasttail{\bottomrule}
%
\begin{supertabular}{p{1cm}p{2cm}}
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
A & Test text \tabularnewline
B & Test text \tabularnewline
\end{supertabular}
\end{center}
\onecolumn
\end{document}

Which gives:

enter image description here

1
  • This seems to be what I was looking for, thank you for the example. – Phil Nope May 22 '15 at 13:58

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.