63

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}
  • 5
    You could simply use a p cell to get the content wrapped, such as \multicolumn{2}{p{.8\textwidth}}{Notes. Lorem ipsum ...}. – Stefan Kottwitz Mar 4 '11 at 19:57
  • 1
    Your sample document doesn't compile properly. I added a \shorttitle command to make it do so. – Alan Munn Mar 4 '11 at 19:58
  • 3
    For this particular use (i.e. a general note) the comments above are adequate. For proper footnotes in tables you should probably use the threeparttable package. You should also probably be using the booktabs package. See this answer to this question: Formatting table – Alan Munn Mar 4 '11 at 20:09
  • threepartable is one of the best suggestion for this... – MadyYuvi Apr 15 at 6:45
68

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

  • 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 9 '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 9 '11 at 14:11
15

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.

  • 1
    Please note that \raggedright doesn't take an argument but is a switch. Correct syntax would be {\raggedright <Text>\par}. – Skillmon Apr 14 at 8:07
6

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

  • 8
    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
  • @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. – danielunderwood Sep 17 '15 at 16:29
  • @robkennedy 14 cm seems to work well – oisin4690 Jan 4 '16 at 15:06

protected by Community Feb 9 '17 at 19:56

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?