I want to do vertical alignment of subtables. The following is a minimal example of the tables I have.
\documentclass{article}
\usepackage{multirow}
\usepackage{subcaption}
\begin{document}
\begin{table}[]
\centering
\caption{Test1}
\begin{subtable}{.3\linewidth}
\centering
\caption{Subtable 1}
\begin{tabular}{|l|l|c|}
\hline
\multicolumn{2}{|c|}{Col 1} & Col 2 \\ \hline
\multicolumn{2}{|l|}{Cell 1} & 1 \\ \hline
\end{tabular}
\end{subtable}%
\begin{subtable}{.3\linewidth}
\caption{Subtable 2}
\centering
\begin{tabular}{|l|l|c|}
\hline
\multicolumn{2}{|c|}{Col 1} & Col 2 \\ \hline
\multicolumn{2}{|l|}{Cell 1} & 1 \\ \hline
\multicolumn{2}{|l|}{Cell 2} & 2 \\ \hline
\end{tabular}
\end{subtable}%
\end{table}
\end{document}
This generates the following type of table
What to do if I want to get a table like this (edited in paint):
Best Answer
Use the optional argument of the
subtable
environment: