What vertical space is inserted between tabular and tablenotes environments when we use the threeparttable package? I'm trying to build a tablenotes
environment that looks similar to the one from threeparttable
but without most of its bells and whistles to use in Beamer, which doesn't really work with threeparttable
. Alas, I find it quite hard to disentangle the source code to threeparttable
.
The following MWE shows how the vertical spacing between the tabular and the notes is different when I use a tablenotes
environment and when I use a simple \raggedright
paragraph.
\documentclass{article}
\usepackage[para,flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage{tabularx}
\begin{document}
\begin{table}[h]
\begin{threeparttable}
\caption{With \texttt{tablenotes} environment}
\begin{tabularx}{\linewidth}{@{}Xccc@{}}
\toprule
& A & B & C \\
\midrule
First row heading & 123 & 456 & 789 \\
Second row heading & 123 & 456 & 789 \\
Third row heading & 123 & 456 & 789 \\
\bottomrule
\end{tabularx}
\begin{tablenotes}
\emph{Note:} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
\end{tablenotes}
\end{threeparttable}
\end{table}
\clearpage
\begin{table}[h]
\begin{threeparttable}
\caption{Without \texttt{tablenotes} environment}
\begin{tabularx}{\linewidth}{@{}Xccc@{}}
\toprule
& A & B & C \\
\midrule
First row heading & 123 & 456 & 789 \\
Second row heading & 123 & 456 & 789 \\
Third row heading & 123 & 456 & 789 \\
\bottomrule
\end{tabularx}
\raggedright \emph{Note:} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\par
\end{threeparttable}
\end{table}
\end{document}
\par
.tabularx
andtabular*
environments, but not withtabular
environments. Maybe the issue isn't related to thetablenotes
environment but, instead, to the waytabularx
andtabular*
are defined.threeparttable
environment and just use my\raggedright
line, then the vertical spacing is just as in the second table from the MWE irrespective of whether I usetabularx
,tabular*
,tabular
ortabulary
. So, the vertical space is introduced bythreeparttable
but the package seems to treattabularx
andtabular*
environments differently than it doestabular
andtabulary
environments.tabularx
package -- will notice your query and take a very close look into how thethreeparttable
,tabularx
andtabular*
are interacting and how/why their interactions are slightly different from the ways thetabular
andthreeparttable
environments interact.tabularx
tag to further lure @DavidCarlisle to join me :-D