[http://tex.stackexchange.com/questions/350810/side-by-side-tables-of-unequal-height-alignment][1]
我希望每个表格都有主标题和子标题。
[1]:我的代码和图像在这里
答案1
使用subtable
环境,来自subcaption
:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{caption, subcaption}
\begin{document}
\begin{table}[!htb]
\begin{subtable}{0.4\linewidth}
\centering
\begin{tabular}{||c c c c c c||}
\hline
-- &A & B&C&D&E\ \\ [0.5ex]
\hline\hline
T1& 10 & 12 & 14 & 45 &87 \\
\hline
T2& 10 & 12 & 14 & 45 &87\\
\hline
T3& 10 & 12 & 14 & 45 &87\\
\hline
T4& 10 & 12 & 14 & 45 &87\\
\hline
T5& 10 & 12 & 14 & 45 &87\\
\hline
T6& 10 & 12 & 14 & 45 &87\\
\hline
T7& 10 & 12 & 14 & 45 &87\\[1ex]
\hline\hline
\end{tabular}
\caption{First subtable}\label{table 1}
\end{subtable}
\hfill$\Rightarrow$\hfill\mbox{}
\begin{subtable}{0.4\linewidth}
\centering
\begin{tabular}{||c c c c c c||}
\hline
-- &A & B&C&D&E\ \\ [0.5ex]
\hline\hline
$<$T1,T2$>$& 10 & 12 & 14 & 45 &87 \\
\hline
$<$T1,T3$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T1,T4$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T1,T5$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T1,T6$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T1,T7$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T2,T3$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T2,T4$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T2,T5$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T2,T6$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T2,T7$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T3,T4$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T3,T5$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T3,T6$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T3,T7$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T4,T5$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T4,T6$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T4,T7$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T5,T6$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T5,T7$>$& 10 & 12 & 14 & 45 &87\\
\hline
$<$T6,T7$>$& 10 & 12 & 14 & 45 &87\\ [1ex]
\hline\hline
\end{tabular}
\caption{Second subtable}\label{table 2}
\end{subtable}
\caption{Database Instance}\label{table:dbi1}
\end{table}
\end{document}