98

I'm using the latex package apa6e because the apa package isn't using APA style version 6 yet.

Now I'm trying to add a table with notes right underneath it, like in this table for instance:

Example Table

Since the \caption{} is used as a title above the table, I have to add an extra row for the notes that goes over the whole table width. The problem is that the notes won't fit into one line so I need multi-line cell. How can I accomplish that? Or am I doing it totally wrong and there is a much easier way? I guess footnotes don't work here.

\documentclass{apa6e}

\begin{document}
\shorttitle{}
\begin{table}
\caption{title}
\begin{tabular}{cc}
foo & bar\\
\hline
\multicolumn{2}{l}{Notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lacus orci, porttitor et posuere sit amet, tempor non justo. Ut quis aliquet turpis. Ut dictum nulla eget purus elementum a lacinia libero varius. Donec malesuada nulla ut odio rhoncus convallis. Aenean faucibus sollicitudin sapien, a vestibulum ante rhoncus sit amet. In vitae mi justo. In arcu metus, porta et lacinia ut, ultricies sed eros.}
\end{tabular}

\end{table}
\end{document}

3 Answers3

108

As a demonstration, here is an implementation using threeparttable:

\documentclass{article}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\begin{document}

\begin{table}
  \begin{threeparttable}
    \caption{Sample ANOVA table}
     \begin{tabular}{lllll}
        \toprule
        Stubhead & \( df \) & \( f \) & \( \eta \) & \( p \) \\
        \midrule
                 &     \multicolumn{4}{c}{Spanning text}     \\
        Row 1    & 1        & 0.67    & 0.55       & 0.41    \\
        Row 2    & 2        & 0.02    & 0.01       & 0.39    \\
        Row 3    & 3        & 0.15    & 0.33       & 0.34    \\
        Row 4    & 4        & 1.00    & 0.76       & 0.54    \\
        \bottomrule
     \end{tabular}
    \begin{tablenotes}
      \small
      \item This is where authors provide additional information about
      the data, including whatever notes are needed.
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\end{document}

Example of threeparttable LaTeX package

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • Thanks to your nice answer and for pointing me to booktabgs. Could you/anyone help me on how to get \midrule s that do not span the whole table (like \cline)? – Henrik Aug 09 '11 at 14:07
  • 3
    I found the solution on my own. It is using \cmidrule{a-b} where aand b are the number of rows spanned (to span a single row use e.g., \cmidrule{1-1}. – Henrik Aug 09 '11 at 14:11
31

You can use {\raggedright insert notes here \par} after \end{tabular} but before \end{table}:

\documentclass{article}
\begin{document}

\begin{table}
     \centering
    \caption{Sample ANOVA table}
     \begin{tabular}{lllll}
        \hline \hline 
        Stubhead & \( df \) & \( f \) & \( \eta \) & \( p \) \\
        \hline 
                 &     \multicolumn{4}{c}{Spanning text}     \\
        Row 1    & 1        & 0.67    & 0.55       & 0.41    \\
        Row 2    & 2        & 0.02    & 0.01       & 0.39    \\
        Row 3    & 3        & 0.15    & 0.33       & 0.34    \\
        Row 4    & 4        & 1.00    & 0.76       & 0.54    \\
        \hline 
     \end{tabular}
     \vspace{1ex}

     {\raggedright This is where authors provide additional information about the data, including whatever notes are needed. \par}
\end{table}

\end{document}

However, notice that the notes will span the whole page, and will not be limited to the width of the table.

pietro
  • 725
13

You could just add a \multicolumn{<ncols>}{|p{<width>}|} for the last row.

vonbrand
  • 5,473
  • 10
    But how do you know what width to put there? That's an important detail that this answer lacks. – Rob Kennedy May 30 '14 at 21:04
  • 2
    @RobKennedy This is a bit late, but I ended up here looking for how to do this. What worked in my case was to use \linewidth for the width, although you could also use something like \columnwidth depending on what your formatting is. – Daniel Underwood Sep 17 '15 at 16:29
  • @robkennedy 14 cm seems to work well – oisinkenn Jan 04 '16 at 15:06