# How do I place two tables with different numbers of rows at the same height?

I want to start two tables with different number of rows at the same height.

Basically, I want the horizontal lines to be at the same height.

This is the current code I have:

\adjustbox{valign=h}{
\begin{tabular}{ c | c c }
NFA & 0 & 1 \\
\hline
$q_0$ & $[q_0q_1]$ & $q_0$ \\
$q_1$ & $\varnothing$ & $q_2$ \\
$q_2$ & $q_3$ & $q_3$ \\
$q_3$ & $\varnothing$ & $\varnothing$ \\
\end{tabular}
\begin{tabular}{ c | c c }
DFA & 0 & 1 \\
\hline
$q_0$ & $[q_0q_1]$ & $q_0$ \\
$[q_0q_1]$ & $[q_0q_1]$ & $[q_0q_2]$ \\
$[q_0q_2]$ & $[q_0q_1q_3]$ & $[q_0q_3]$ \\
$[q_0q_1q_3]$ & $[q_0q_1]$ & $[q_0q_2]$ \\
$[q_0q_3]$ & $[q_0q_1]$ & $[q_0q_1]$ \\
\end{tabular}
}

• What's \adjustbox supposed to do? And valign=h is not a valid option. Oct 31 '15 at 21:42

If you add the optional argument [t] to each tabular they will be vertically aligned by the first line.

As egreg mentions in a comment, the \adjustbox likely doesn't have any effect, and valign=h is not a valid option for it anyway, so I removed it.

\documentclass{article}
\usepackage{amssymb}
\begin{document}
\begin{tabular}[t]{ c | c c }
NFA & 0 & 1 \\
\hline
$q_0$ & $[q_0q_1]$ & $q_0$ \\
$q_1$ & $\varnothing$ & $q_2$ \\
$q_2$ & $q_3$ & $q_3$ \\
$q_3$ & $\varnothing$ & $\varnothing$ \\
\end{tabular}%
\begin{tabular}[t]{ c | c c }
DFA & 0 & 1 \\
\hline
$q_0$ & $[q_0q_1]$ & $q_0$ \\
$[q_0q_1]$ & $[q_0q_1]$ & $[q_0q_2]$ \\
$[q_0q_2]$ & $[q_0q_1q_3]$ & $[q_0q_3]$ \\
$[q_0q_1q_3]$ & $[q_0q_1]$ & $[q_0q_2]$ \\
$[q_0q_3]$ & $[q_0q_1]$ & $[q_0q_1]$ \\
\end{tabular}
\end{document}

• I'm not sure \adjustbox has any influence on the output (apart adding unwanted spaces at either end, because of missing %). By the way, valign=h doesn't seem to be a valid option. Oct 31 '15 at 21:40
• @egreg I considered removing it, but I didn't know the context, so I left it. You are of course correct about h, so that's another argument for removing it altogether. Will edit, thanks. Oct 31 '15 at 21:54
• You could also add a % in the line before \quad. ;-) Oct 31 '15 at 22:11