I have to tables side by side, but the they don't begin at the same height. Is there a way to align them side by side at the top?
This is what I have so far..
\documentclass[12pt]{article}
\usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
\usepackage{subcaption}
\usepackage{tabularx}
\begin{document}
Test Datum:
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\begin{table}[htb]
\begin{subtable}[t]{13.4cm}
\raggedright
\setlength{\extrarowheight}{6pt}
\begin{tabular}{|L{25mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|}
\hline
Topic 1 & & & & & & & &\\
Topic 2 & & & & & & & &\\
Topic 3 & & & & & & & &\\
Topic 4 & & & & & & & &\\
Topic 5 & & & & & & & &\\
Topic 6 & & & & & & & &\\
Topic 7 & & & & & & & &\\
\hline
\end{tabular}
\end{subtable}
\begin{subtable}[t]{3cm}
\raggedleft
\setlength{\extrarowheight}{6pt}
\setlength{\tabcolsep}{12pt}
\begin{tabular}{|L{3cm}|}
\hline
Material \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
\hline
\end{tabular}
\end{subtable}
\end{table}
\end{document}
Update !!!
Now they are aligned at the top but the space to the edges of the document is not the same for the two tables
\documentclass[12pt]{article}
\usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
\usepackage{tabularx}
\begin{document}
Test Datum:
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\begin{table}[htb]
\raggedright
\setlength{\extrarowheight}{6pt}
\begin{tabular}[t]{|L{25mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|L{5mm}|}
\firsthline
Topic 1 & & & & & & & &\\
Topic 2 & & & & & & & &\\
Topic 3 & & & & & & & &\\
Topic 4 & & & & & & & &\\
Topic 5 & & & & & & & &\\
Topic 6 & & & & & & & &\\
Topic 7 & & & & & & & &\\
\hline
\end{tabular}
\raggedleft
\setlength{\extrarowheight}{6pt}
\setlength{\tabcolsep}{12pt}
\begin{tabular}[t]{|L{3cm}|}
\firsthline
Material \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
$\bullet$ \\
\hline
\end{tabular}
\end{table}
\end{document}
Best Answer
You don't need
subtable
, which is used when you have to add subcaptions.Use the
[t]
optional argument, but note\firsthline
.You possibly don't need
table
, but just aflushleft
environment.