0

When I use the floatrow package, threeparttable's ability to change the caption width to fit the table seems to be lost. The first image shows what I expect:

This is the behavior I want

But this behaviour is lost with floatrow.

It is lost with floatrow

Any ideas?

MWE below.

\documentclass[11pt]{scrartcl}
\usepackage{threeparttable}
\usepackage[font=small,labelfont=sc]{caption}
%%% comment the next two lines out and the caption width wortks
\usepackage{floatrow}  % this package removes tpt caption width
\floatsetup[table]{capposition=top}
%%%
\begin{document}


\begin{table}[htb]   %% add [htb] here for better
    \begin{threeparttable}
        \caption{Some caption to demonstrate my issue}
            \begin{tabular}{lll}
                Letter & Number & Number\\
                \hline
                Alpha & 123 & 10\\
                Beta & 246 & 100\\
                Delta & 369 & 1000\\
        \end{tabular}
        \begin{tablenotes}
            \item[] Some notes, these seem to be working
        \end{tablenotes}
    \end{threeparttable}
\end{table}

\end{document}
2
  • Are floatroaw and KOMA compatible? KOMA replaces \caption and floatrow replaces \@makecaption. Commented Mar 25, 2020 at 23:38
  • @JohnKormylo the issue persists if I change the class to article. Commented Mar 26, 2020 at 11:50

1 Answer 1

2

Just use the floatrow syntax. I took the opportunity to slightly improve the table with the rules from booktabs, which have some vertical padding and make tables look less tight.

\documentclass[11pt]{article}%{scrartcl}
\usepackage[flushleft]{threeparttable}
\usepackage[font=small,labelfont=sc]{caption}
%%% comment the next two lines out and the caption width wortks
\usepackage{floatrow} % this package removes tpt caption width
\floatsetup[table]{capposition=top}
\usepackage{booktabs}
%%%
\begin{document}

\begin{table}[htb] %% add [htb] here for better
   \ttabbox{\caption{Some caption to demonstrate my issue}}{\begin{threeparttable}
            \begin{tabular}{lll}
                Letter & Number & Number\\
               \midrule
                Alpha & 123 & 10\\
                Beta & 246 & 100\\
                Delta & 369 & 1000\\
        \end{tabular}
        \begin{tablenotes}
            \item[]\hskip-0.25em Some notes, these seem to be working
        \end{tablenotes}
    \end{threeparttable}}
\end{table}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .