Graphics, Figures & TablesSpace between tabulars

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Space between tabulars

Post by MatthiasN »

Hi everyone,

I'm having a problem with the spacing between two tabulars. Because I had too much data to fit on a page in one table, I divided it up in two tables like this:

Code: Select all

\begin{table}
    \begin{tabular}
    First half of data
    \end{tabular}
    \begin{tabular}
    Other half of data
    \end{tabular}
\end{table}
This way, I get two tables underneath each other on the page. The only problem is that they are closely packed together on the page and it looks a bit crowded. I really want to fix this. It also brings along another problem, but this one I could live with. I have a vertical line in each tabular, and I would like to align those.

Thanks for reading and I really hope someone can help me.

Greetings,
Matthias
Last edited by Stefan Kottwitz on Mon Oct 22, 2012 5:16 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Space between tabulars

Post by cgnieder »

The first problem should be easy: you can insert the space you want with \vspace{<dim>}. The second one can't be solved without a (complete) Infominimal working example.

Regards
site moderator & package author
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Space between tabulars

Post by MatthiasN »

Hey thanks. It works and it looks much better already. The second problem looks a bit like this:

Code: Select all

\begin{table}
First half of data
\begin{tabular}{ll|ll}
\end{tabular}
\begin{tabular}{ll|ll}
Second half of data
\end{tabular}
So there is a vertical line running through both tables. The tables have the same amount of colums and the vertical line runs between the same colums. But when the tables are displayed underneath each other, the vertical lines do not align (they do not have to connect, but just have to be underneath each other).

I know I could fix this by specifying the width of the first two colums for both tables, but I thought that there might be a more elegant solution, that doesn't need my direct interference with the column width.

Greetings,
Matthias
Last edited by cgnieder on Mon Oct 22, 2012 9:13 pm, edited 1 time in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Space between tabulars

Post by cgnieder »

Since you haven't provided a Infominimal working example here's an idea that might or might not work for you: don't use two tabulars but one and interrupt it with \multicolumn:

Code: Select all

\begin{tabular}{ll|ll}
 First  & half & of & data \\
 \multicolumn{4}{c}{} \\[1cm]
 Second & half & of & data
\end{tabular}
Regards
site moderator & package author
MatthiasN
Posts: 41
Joined: Sun Mar 11, 2012 1:21 pm

Re: Space between tabulars

Post by MatthiasN »

Thanks, that works great!
Post Reply