I have two tables side by side, in one minipage each. My question is, how to use \toprule
and \bottomrule
to span the entire width of the table
environment (as opposed to spanning only the current tabular
)? By "entire width" I don't mean literally having length equal to \textwidth
, but to be smart about it like \toprule
is.
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}
% I want a \toprule (?) here (?) to (cleverly) span
% the entire table environment.
\begin{minipage}[t]{.5\textwidth}
\begin{tabular}{c}
\toprule % This spans only this (leftmost) table.
\\
% Table Content.
\\
\bottomrule
\end{tabular}
\end{minipage}
~
\begin{minipage}[t]{.5\textwidth}
\begin{tabular}{c}
\toprule % This spans only this (rightmost) table.
\\
% Table Content.
\\
\bottomrule
\end{tabular}
\end{minipage}
\end{table}
\end{document}
table
environments (which produce a floating object and can therefore be used in “outer paragraph mode” only); what you can nest aretabular
environments.