20

I've tried to get some table notes to work in a paper I'm working on.

Here is what my table looks like (minus the details for clarity):

\documentclass[progress]{cmpreport}
\usepackage{enumitem}
\usepackage{wasysym}
\usepackage{framed}
\usepackage{pgfgantt,rotating}
\usepackage{subfloat}
\usepackage{multirow}
\usepackage{blindtext}

...

\begin{document}
\begin{table*}[ht]
\caption{Revisions}
\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{table*}

...

\end{document}

Although they appear below the table, I can not seem to get the superscript reference letter to appear...

I've looked at other examples on here and they seem a lot more complicated tables that this one...

Is there something I'm missing?

David Carlisle
  • 757,742

2 Answers2

39

You need the threeparttable package.

enter image description here

  \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}
Janosh
  • 4,042
Jesse
  • 29,686
1

The environment {NiceTabular} of nicematrix has its own command \tabularnote to insert tabular notes directly in the array.

\documentclass{article}
\usepackage{caption}
\usepackage{nicematrix}
\usepackage{enumitem}
\usepackage{booktabs}

\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}} \toprule Title 1 & Title 2 & Title 3 & Title 4 \ \midrule Cell 1 & Cell 1 & Cell 3 & Cell 4\tabularnote{My note}\ Cell 1 & Cell 1 & Cell 3 & Cell 4\tabularnote{My other note}\ \bottomrule \end{NiceTabular} \end{table}

\end{document}

Output of the above code

F. Pantigny
  • 40,250