I just noticed that Donald Arseneau's excellent threeparttable
package adds extra vertical space before and after the caption. This can be seen in the MWE below where I have set \abovecaptionskip
and \belowcaptionskip
to zero to emphasize the added space.
Could you please help me figure out where the added vertical space comes from and how to remove it? I have tried to decipher the package code but it is sadly beyond my skill level.
\documentclass[12pt]{article}\usepackage{threeparttable}\usepackage{tabularx}\setlength{\abovecaptionskip}{0pt}\setlength{\belowcaptionskip}{0pt}\begin{document} \begin{table}[h] \caption{Testing testing testing} \begin{tabularx}{\linewidth}{XXXX} A1 & B1 & C1 & D1 \\ A2 & B2 & C2 & D2 \\ A3 & B3 & C3 & D3 \\ \end{tabularx} \end{table} \clearpage \begin{table}[h] % \vskip-\lastskip%\vspace{-.2\baselineskip} \begin{threeparttable} \caption{Testing testing testing} \vskip-\lastskip%\vspace{-.2\baselineskip} \begin{tabularx}{\linewidth}{XXXX} A1 & B1 & C1 & D1 \\ A2 & B2 & C2 & D2 \\ A3 & B3 & C3 & D3 \\ \end{tabularx} \end{threeparttable} \end{table}\end{document}