3

I'm trying to use ctable since it's much easier to work with than threeparttable and all of its additional packages but I get an error stating that "Command \tnote already defined".

I think it's something to do with the apa6 class but I don't know how to change that.

\documentclass[man]{apa6}
\usepackage{ctable}
\shorttitle{}

\begin{document}

\ctable[
caption = Some caption,
pos = h
]{ccc}{
}{\FL
A & B & C\ML
1 & 2 & 3\NN
4 & 5 & 6\LL
}

\end{document}
  • It wasn't clear from the question, but just in case: the apa6 class automatically loads the threeparttable package, and also defines its own \tnote command for use in those tables. You may have to stick with its use of threeparttable. – Mike Renfro Apr 8 '12 at 0:06
4

As mentioned by Mike in comment, apa6 loads threeparttable which defines \tnote. As such, "undefining" \tnote via

\let\tnote\relax

resolves the conflict between ctable and threeparttable:

enter image description here

\documentclass[jou]{apa6}% http://ctan.org/pkg/apa6
\let\tnote\relax% "Free up" \tnote for use in ctable
\usepackage{ctable}% http://ctan.org/pkg/ctable
\shorttitle{}
\begin{document}
\ctable[
    caption = Some caption,
    pos = h
  ]{ccc}{
  }{\FL
    A & B & C\ML
    1 & 2 & 3\NN
    4 & 5 & 6\LL
  }
\end{document}

Alternatively, use the threeparttable format as suggested by Mike.

  • Thanks. This solves the issue in jou mode but gives me errors in man mode. Do you happen to know why this is the issue? – iAmAMutt Apr 9 '12 at 13:56
3

Depending on what you're trying to get out of ctable, it might be easiest to stick with threeparttable, since apa6 automatically loads it. Slightly adapted example including a footnote (like what ctable's \tnote would do):

\documentclass[jou]{apa6}
\begin{document}
\begin{table}[htbp]
\caption{A complex table}
\label{tab:ComplexTable}
\begin{tabular}{@{}lrrl@{}} \toprule
Distribution type & \multicolumn{2}{l}{Percentage of} & Total \\
& \multicolumn{2}{l}{targets with} & trials per \\
& \multicolumn{2}{l}{segment in} & participant \\
\cmidrule(r){2-3}
& Onset & Coda & \\
\midrule
Categorical -- onset\tabfnm{a} & 100 & 0 & 196 \\
Probabilistic & 80 & 20 & 200 \\
& 60 & 40 & 160 \\
Categorical -- coda & 0 & 100 & 196 \\
\bottomrule
\end{tabular} \\
\tabfnt{a}{A footnote about categorical -- onset}
\end{table}
\end{document}

enter image description here

  • Credit where credit is due: the example is straight from the manual (Beitzel, 2012) – user35260 Aug 29 '13 at 3:06
  • My mistake in not making that more explicit. I said "slightly modified" instead of "cut down from apa6 documentation", assuming the poster would find where threeparttable was used, since they were already using apa6. – Mike Renfro Aug 29 '13 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.