3
\documentclass[preprint,floatfix] {revtex4} 
\usepackage{caption}
\usepackage{booktabs}

\begin{document}

\renewcommand{\thetable}{\arabic{table}}

\begingroup
\squeezetable
\begin{table}
\captionsetup{font=scriptsize}
\caption {\label{tab:table1} SUMMARY STATISTICS FOR CONTRIBUTIONS BY INDIVIDUAL CONTRIBUTORS}
\begin{ruledtabular}
\begin{tabular}{llllll}
  & \multicolumn{2}{c}{Pre-block}  & \multicolumn{2}{c}{Post-block} & Paired \textit{t}-test   \\ 
\cline{2-3} \cline{4-5} \cline{6-6}

        &  Mean   & Standard error                                                  &   Mean          
    & Standard error    & \textit{t}-stats                                                  \\    \hline




\input{table1_panelA} 
\hline
\addlinespace[0.3cm]
\input{table1_panelB}

\end{tabular}

\end{ruledtabular}

\end{table}
\endgroup






\end{document}




3
  • 2
    Welcome! Did you have a look at \threeparttable? BTW, make your MWE compilable so others can help you better.
    – AboAmmar
    Commented Mar 24, 2020 at 0:45
  • Hi, what is MWE?
    – Yao Zhao
    Commented Mar 24, 2020 at 11:51
  • MWE means Minimal Working Example, a small self contained document, which we can compile as it is and which reproduce your problem. You actually provide a MWE, but unfortunately, we can't test it since we haven't files with data for your table. If you are still interested for answer which consider your real data, please replace your files in table with one or two rows of real data which contain table notes. Otherwise you should consider @jsbibra answer. BTW, I would consider in your table design rules defined in the booktab package and S columns defined in the siunitx package.
    – Zarko
    Commented Aug 22, 2020 at 11:47

3 Answers 3

1
  • on-topic issue: use of threeparttable is promising way to solve your problem (as suggested in @ AboAmmar comment and provided an example in @js Bibra answer)
  • off-topic issues, I would make the following changes in your table design:
    • instead of revtex4 use revtex4-2 version of document class, which support rules from the booktabs package
    • for horizontal rules use rules defined in the booktabs package
    • for columns with number use S column type, defined in the siunitx package
  • using dummy numbers for table content, An MWE can be:
\documentclass[preprint,floatfix] {revtex4-2}
%\usepackage{caption}
%\captionsetup{font=scriptsize}
\usepackage{booktabs, 
            multirow, threeparttable}   % new
\usepackage{siunitx}                    % new
\usepackage{xparse}                     % new
\NewExpandableDocumentCommand\mcc{O{1}m}
    {\multicolumn{#1}{c}{#2}}

\usepackage{lipsum}                     % for dummy text


\begin{document}
\lipsum[11]
    \begin{table}[ht]
\begin{threeparttable}
\caption {Summary statistics for contributions by individual contributors}
\label{tab:table1}
    \begin{tabular}{l
               *{2}{S[table-format=3.2]S[table-format=3.2]}
                    S[table-format=3.2]}
    \toprule
\multirow{2.4}{*}{Contributor}
    & \mcc[2]{Pre-block}        & \mcc[2]{Post-block}   & {Paired $t$-test}     \\
   \cmidrule(l){2-3} 
   \cmidrule(l){4-5} 
   \cmidrule(l){6-6}
    &  {Mean}   & {SE\tnote{a}} & {Mean}    & {SE}      & {\textit{t}-stats}    \\                                               &  {Mean}   & {SE\tnote{a}} & {Mean}    & {SE}      & {\textit{t}-stats}    \\                                                   \midrule
panel A\tnote{b}
    & 123.45    & 12.3          &  123.45    & 12.3     & 123.45                \\
    \midrule
panel B\tnote{c}
    & 124.82    &  9.1          &  124.82    &  9.1     & 124.8                 \\
    & 124.82    &  9.1          &  124.82    &  9.1     & 124.8                 \\
    \bottomrule
\end{tabular}
    \begin{tablenotes}[flushleft]\footnotesize
\item[a]    SE: Standard error
\item[b]    description of th panel A
\item[c]    description of the panel B
    \end{tablenotes}
\end{threeparttable}
    \end{table}
\end{document}

enter image description here

0

You can use {NiceTabular} of nicematrix which have a built-in command \tabularnote to typeset the notes of a tabular. You can thoroughly customize the notes (the notes under the tabular are composed in a type of list of enumitem).

\documentclass{article}

\usepackage{nicematrix}
\usepackage{enumitem}

\begin{document}
\begin{table*}[ht]
\caption{Revisions}
\centering
\begin{NiceTabular}{p{0.10\linewidth}
                    p{0.15\linewidth}        
                    p{0.45\linewidth}
                    p{0.20\linewidth}}%
\hline
Title 1 & Title 2 & Title 3 & Title 4 \\
\hline
Cell 1  & Cell 1  & Cell 3  & Cell 4\tabularnote{My note} \\
Cell 1  & Cell 1  & Cell 3  & Cell 4\tabularnote{My other note} \\
\hline
\end{NiceTabular}
\end{table*}
\end{document}

Ouput of the above code

-1

Starting from the excellent suggestion by @AboAmmar

enter image description here

MWE

\documentclass{article}
\usepackage[flushleft]{threeparttable}
\begin{document}
    \begin{table*}[ht]
        \caption{Revisions}
        \begin{threeparttable}
            \centering
            \begin{tabular}{p{0.10\linewidth}
                    p{0.15\linewidth}
                    p{0.45\linewidth}
                    p{0.20\linewidth}}
                \hline
                Title 1 & Title 2 & Title 3 & Title 4          \\
                \hline
                Cell 1  & Cell 1  & Cell 3  & Cell 4 \tnote{a} \\
                Cell 1  & Cell 1  & Cell 3  & Cell 4 \tnote{b} \\
                \hline
            \end{tabular}
            \begin{tablenotes}
                \item[a] My Note.
                \item[b] My Other Note.
            \end{tablenotes}
        \end{threeparttable}
    \end{table*}
\end{document}

This solution already exists at - https://tex.stackexchange.com/a/146129/197451

1
  • 1
    You don't notice the difference because this tabular is crafted to occupy the whole \linewidth, but the \caption can or should go inside the threeparttable to be given the same width as the tabular and the notes. (Otherwise it would be "twoparttable" :-) Commented Mar 25, 2020 at 3:12

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