bloo wrote:I'm trying to set up two tables in side-by-side columns, and get them to line up well. I was able to get close with each table in a Box and the page in two-column format, but only when I don't have any other text on the page. Vertical spacing wouldn't correct this. Below is a sketch of what I'm trying to accomplish.
It would help if you gave an example of the LaTeX code you've tried and an explanation of what exactly you don't like about what it does.
What's wrong with this code:
Code: Select all
\begin{tabular}[t]{ccc}
A & B & C\\
D & E & F\\
G & H & I\\
J & K & L
\end{tabular}
\begin{tabular}[t]{ccc}
a & b & c\\
d & e & f
\end{tabular}
In this example, you must be careful not to put a blank line between the two tabular environments. If you want to separate them in code, put a comment (%) on each blank line. More importantly, notice the
[t] that I passed to both tabular environments. It causes their "tops" to be aligned. By default, they are aligned by their centers. You can also align them by their bottoms.
[ Note that if the tables are individually too wide, the second table will get "wrapped" to the second line. ]
If you want those on a line by themselves, make sure that they are either in an environment that provides that separation (e.g., a float environment like
table) or you have a blank line before and after them (but NOT between them). Some popular choices are
Code: Select all
\begin{table}\centering
% tabular environment one
% tabular environment two
\end{table}
or
Code: Select all
\begin{table}[ht!]\centering
% tabular environment one
% tabular environment two
\end{table}
or
Code: Select all
% Blank line
~\hfill
% tabular environment one
% tabular environment two
\hfill~
% Blank line
or
Code: Select all
% Blank line
~\hfill
% tabular environment one
\hfill
% tabular environment two
\hfill~
% Blank line
Do any of those do what you want? If not, then explain why. Right now I don't think it's clear from your message.