# Increase width of the caption in threeparttable

I wonder how to restore width of the caption in threeparttable environment to regular table environment. It is important that caption is inside threeparttable environment. In other words I want to increase caption width (Figure 1).

The minimal working example goes as follows:

\documentclass{article}
\usepackage{threeparttable,booktabs}

\begin{document}

\begin{table}
\centering
\begin{threeparttable}
\caption{This is example table with width equal to default width in table environment}
\begin{tabular}{cccc}
\toprule
Col 1& Col 2 & Col 3 & Col 4 \\
\midrule
1 &  2 &  3 &  4 \\
5 &  6 &  7 &  8 \\
9 & 10 & 11 & 12 \\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft]\footnotesize
\item[1] Long, long, long, long, long, long, note
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}


When I insert \renewcommand\TPTminimum{\linewidth} before \caption{...} the width extends, but the table in left aligned (Figure 2 below).

Any suggestion or pointer is greatly appreciated.

• Why is it important that the caption is inside threeparttable? – egreg Nov 5 '17 at 12:03
• @egreg Because I need to put footnote also in the caption. – Andrej Nov 5 '17 at 12:18
• The environment basically typesets a \vbox where the \hsize is the maximum between the table width and \TPTminimum. – egreg Nov 5 '17 at 12:27
• You can move the caption outside threeparttable, but still inside table. – Michael Palmer Nov 5 '17 at 12:49
• @MichaelPalmer Now I use \caption{This is example table with width equal \ldots\tnote{a}} outside the threeparttable. However, the notes are printed below the table but the footnote mark in caption is omitted. – Andrej Nov 5 '17 at 12:54

The macro \tnote is defined in such a way that it will not function outside the threeparttable environment. This is mostly to prevent it from showing up in the \listoftables.

\documentclass{article}
\usepackage{threeparttable,booktabs}

\begin{document}

\listoftables

\begin{table}
\let\TPToverlap=\TPTrlap
\centering
\caption{This is example table with width equal to default width in table
environment\tnote{1}}
\begin{threeparttable}
\begin{tabular}{cccc}
\toprule
Col 1& Col 2 & Col 3 & Col 4 \\
\midrule
1 &  2 &  3 &  4 \\
5 &  6 &  7 &  8 \\
9 & 10 & 11 & 12 \\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft]\footnotesize
\item[1] Long, long, long, long, long, long, note
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}


If you also want the notes wider, you can put the tabular inside another tabular.

\documentclass{article}
\usepackage{threeparttable,booktabs}

\newlength{\mymargin}

\begin{document}

\begin{table}
\begin{threeparttable}
\caption{This is example table with width equal to default width in table
environment\tnote{1}}
\begin{tabular}{@{}p{\textwidth}@{}}
\centering
\begin{tabular}{cccc}
\toprule
Col 1& Col 2 & Col 3 & Col 4 \\
\midrule
1 &  2 &  3 &  4 \\
5 &  6 &  7 &  8 \\
9 & 10 & 11 & 12 \\
\bottomrule
\end{tabular}
\end{tabular}
\begin{tablenotes}[flushleft]\footnotesize
\item[1] Long, long, long, long, long, long, note
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}