3

I use \documentclass[man]{apa6} and my table will not show up when compiling the .tex. I use the following code:

\documentclass[man]{apa6}
\usepackage{enumitem}
\usepackage{amsmath} 
\usepackage{relsize} 
\usepackage{apacite} 
\usepackage{multirow} 
\usepackage{graphicx}
\usepackage{bm}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{threeparttable}

\begin{document}

\begin{table}
    \begin{threeparttable}
     \label{table}
        \begin{tabular}{l c c c c} \hline
        & $i = 1$ & $i = 2$ & $i = 3$ & $i = 4$ \\ \hline
        $\pi_{0(i)}$ & 1.00 & 1.00 & 1.00 & 1.00 \\
        $\pi_{1(i)}$ & 0.90 & 0.80 & 0.70 & 0.60 \\
        $\pi_{2(i)}$ & 0.50 & 0.40 & 0.30 & 0.20 \\
        \end{tabular}
    \end{threeparttable}
\end{table}

\end{document}

Does anyone know how to fix this?

1
  • Your problem is not reproducible. I am seeing the table in my PDF but I get an Undefined control sequence. \efloatseparator error. Please reduce your code to the very minimum.
    – LaRiFaRi
    Apr 28, 2015 at 13:19

3 Answers 3

1

I get no error if I add the proper parts before the table.

\documentclass[man]{apa6}
\usepackage{enumitem}
\usepackage{amsmath} 
\usepackage{relsize} 
\usepackage{apacite} 
\usepackage{multirow} 
\usepackage{graphicx}
\usepackage{bm}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{threeparttable}

\usepackage{kantlipsum} % for mock text

\begin{document}
\title{X}\shorttitle{X}
\author{Who}
\affiliation{Z}
\abstract{ABS}
\maketitle

\kant[1-3]

\begin{table}
\begin{threeparttable}
     \label{table}
        \begin{tabular}{l c c c c} \hline
        & $i = 1$ & $i = 2$ & $i = 3$ & $i = 4$ \\ \hline
        $\pi_{0(i)}$ & 1.00 & 1.00 & 1.00 & 1.00 \\
        $\pi_{1(i)}$ & 0.90 & 0.80 & 0.70 & 0.60 \\
        $\pi_{2(i)}$ & 0.50 & 0.40 & 0.30 & 0.20 \\
        \end{tabular}
\end{threeparttable}
\end{table}

\kant[4-6]

\end{document}
1

If you use the apa6 documentclass with the option man, you should probably also use the option floatsintext. Citing from the user guide:

When revising and proofreading a manuscript, it is most helpful to have the tables and figures readily available (rather than turning most of the way to the end floatsintext of the manuscript to access them). The floatsintext option (specified in the \documentclass line) will integrate tables and figures approximately where they are mentioned in the text. This is available only with the man option, of course, because the other formats already have floats integrated with the text.

Since the table has a lot of "mathy" elements, I think it's more straightforward to input it as an array environment. You may also want to organize the table's header a bit more; a specific suggestion for doing so is given in the code below.

enter image description here

\documentclass[man,floatsintext]{apa6}
%% Commented out the unneeded instructions
%\usepackage{enumitem}
%\usepackage{amsmath} 
%\usepackage{relsize} 
%\usepackage{apacite} 
%\usepackage{multirow} 
%\usepackage{graphicx}
%\usepackage{bm}
%\usepackage{caption}
%\usepackage{subcaption}
\usepackage{threeparttable}
\usepackage{booktabs}

\title{xx}
\shorttitle{x}
\author{y}
\date{z}

\begin{document}

\begin{table}
    \begin{threeparttable}
     \label{table}
     \centering
        $\begin{array}{@{} l c c c c @{}} 
        \toprule
        & \multicolumn{4}{c@{}}{i}\\
        \cmidrule(l){2-5}
        & 1 & 2 & 3 & 4 \\ \midrule
        \pi_{0(i)} & 1.00 & 1.00 & 1.00 & 1.00 \\
        \pi_{1(i)} & 0.90 & 0.80 & 0.70 & 0.60 \\
        \pi_{2(i)} & 0.50 & 0.40 & 0.30 & 0.20 \\
        \bottomrule
        \end{array}$
    \end{threeparttable}
\end{table}

\end{document}
0

Here is how I would type that table:

% arara: pdflatex
% arara: pdflatex

\documentclass[man]{apa6}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{threeparttable}

\begin{document}    
\begin{table}
    \begin{threeparttable}
        \caption{a caption}\label{table}
        \begin{tabular}{l *{4}{S[table-format=1.2]}} 
            \toprule
                         & {$i = 1$} & {$i = 2$} & {$i = 3$} & {$i = 4$} \\ 
            \midrule
            $\pi_{0(i)}$ & 1.00      & 1.00      & 1.00      & 1.00 \\
            $\pi_{1(i)}$ & 0.90      & 0.80      & 0.70      & 0.60 \\
            $\pi_{2(i)}$ & 0.50      & 0.40      & 0.30      & 0.20 \\ 
            \bottomrule
        \end{tabular}
        \begin{tablenotes}
            \item[*] an item
        \end{tablenotes}
    \end{threeparttable}
\end{table} 
\end{document}

enter image description here

However, this results in the error Undefined control sequence. \efloatseparator. This depends on several redefinitions to the endfloat package which gets loaded by apa6. Please see here for the status quo.

You must log in to answer this question.

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