[Tex/LaTex] Top-align two parboxes with tables

boxestablesvertical alignment

I am looking for a two-column solution: The left column contains one table, the right column several tables. I was thinking of using parboxes as follows:

\parbox[t]{2cm}{\vspace{0pt}
\begin{tabular}{ccc}
x & x & x\\
x & x & x\\
x & x & x\\
x & x & x\\
x & x & x
\end{tabular}}
\hfill 
\parbox[t]{2cm}{\vspace{0pt}
\begin{tabular}{ccc}
x & x & x\\
x & x & x
\end{tabular}\\[1em]
\begin{tabular}{ccc}
x & x & x 
\end{tabular}}

But this creates a nasty space between whatever comes before the two columns. Without \vspace{0pt}, the two first tables in both columns are not top-aligned. I am looking for a top-aligned solution without the extra space before the two columns.

Best Answer

Suppress the \vspace{0pt} commands and use the optional argument to control the position of the tabulars:

\documentclass{article}

\begin{document}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\noindent\parbox[t]{2cm}{%
  \begin{tabular}[t]{ccc}
    x & x & x\\
    x & x & x\\
    x & x & x\\
    x & x & x\\
    x & x & x
  \end{tabular}
}\hfill
\parbox[t]{2cm}{%
  \begin{tabular}[t]{ccc}
    x & x & x\\
    x & x & x
  \end{tabular}\\[1em]
  \begin{tabular}{ccc}
    x & x & x 
  \end{tabular}
}

\end{document}

enter image description here