0

I like to add simple notes text under a table. The threeparttable seem to be attractive because it fits the table well. But it is only working with item notes. What is the correct way to adding table notes that are not listed items?

4
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – dexteritas
    Jun 23, 2022 at 10:02
  • 1
    Welcome to TX SX! You can add a new row (without horizontal line afterwards) with this code: \multicolumn{n}{p{some length}}, where n is the number of columns of the initial table.
    – Bernard
    Jun 23, 2022 at 10:03
  • You can add pretty much anything inside a table environment: images, text, even minipages with footnotes. threepartable not so much, since it has to measure the width of the tabular. Jun 23, 2022 at 14:49
  • Any news? You got two nice solution. You can accept one (by clicking on the checkmark at top left side of answers) which you most liked.
    – Zarko
    Mar 18, 2023 at 10:34

2 Answers 2

2

The environment {NiceTabular} of nicematrix has its own system for tabular notes. In particular, there is a key tabularnote to insert text without item in the zone of the footnotes after the main tabular.

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

\begin{document}

\begin{NiceTabular}{@{}llr@{}}%
  [ tabularnote = 
Here you can put a text that will be inserted before the potential tabular notes. 
  ]
\toprule 
Last name & First name & Birth day \\
\midrule
Achard
& Jacques & June 5, 2005 \\
Lefebvre
& Mathilde & January 23, 1975 \\
Vanesse & Stephany & October 30, 1994 \\
Dupont & Chantal & January 15, 1998 \\
\bottomrule
\end{NiceTabular}

\end{document}

Output of the first code

There is also a key notes/bottomrule to add a \bottomrule (of the package booktabs) after the notes.

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

\begin{document}

\begin{NiceTabular}{@{}llr@{}}%
  [ notes/bottomrule,
    tabularnote = 
Here you can put a text that will be inserted before the potential tabular notes. 
  ]
\toprule 
Last name & First name & Birth day \\
\midrule
Achard
& Jacques & June 5, 2005 \\
Lefebvre
& Mathilde & January 23, 1975 \\
Vanesse & Stephany & October 30, 1994 \\
Dupont & Chantal & January 15, 1998 \\
\bottomrule
\end{NiceTabular}

\end{document}

Output of the second code

1
  • Thanks a lot, this is very helpful
    – YuvalOS
    Sep 11, 2023 at 8:28
1

With talltblr defined in the tabularray package this can be simple to achieve:

\documentclass{article}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
\usepackage{lipsum}

\begin{document}
    \begin{table}[ht]
\sisetup{table-format=-1.2{***},
         input-close-uncertainty=,
         input-open-uncertainty=,
         round-mode = places,
         round-precision = 2
         }
\centering
\SetTblrStyle{note}{font=\small, fg=red}
\begin{talltblr}[
caption = {Effect of x on y},
 note{} = {\lipsum[66]}
                ]{colspec={l *{2}{S S[table-format={(}1.2{(}]}},
                  row{1-2,X,Y,Z} = {guard},
                  }
    \toprule
          & \SetCell[c=2]{c}    $y_1$ 
                        &           & \SetCell[c=2]{c}  $y_2$
                                                &           \\
    \cmidrule[r]{2-3} \cmidrule[l]{4-5}
          &     (1)     &   (2)     &   (1)     &   (2)     \\
    \midrule
1.x       &  0.03**     & (0.157)   & 0.03*     & (0.62)    \\
1.hg      &  0.16       & (0.84)    &           &           \\
1.f\#1.hg & -0.6*       & (0.8)     &           &           \\
1.i       &  0.9        & (0.30)    & -0.1      & (0.36)    \\
    \cmidrule[r]{2-3} \cmidrule[l]{4-5}
N         & \SetCell[c=2]{c}    500
                        &           & \SetCell[c=2]{c}  455 
                                                &           \\
FE        & \SetCell[c=2]{c}    Yes 
                        &           & \SetCell[c=2]{c}  Yes
                                                &           \\
Control   & \SetCell[c=2]{c}    Yes 
                        &           & \SetCell[c=2]{c}  Yes 
                                                &           \\
    \bottomrule
\end{talltblr}
    \end{table}
\end{document}

(table example is taken form my answer). Note below table is emphasize with red color, which you can change to some else, for example gray, or use default black by removing fg=red from \SetTblrStyle{note}{...}.

enter image description here

You must log in to answer this question.

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