在 apa6 类文档中包含横向多页表

在 apa6 类文档中包含横向多页表

我对在 apa6 类文档中包含横向多页表有疑问。

下面的例子运行良好(未使用 apa6 类):

\documentclass{article}
\usepackage{longtable}
\usepackage{threeparttablex}
\usepackage{lscape}
\usepackage{tabu}
\begin{document}
\begin{landscape}
\begin{longtabu}{XXX} 
\caption{test} \\
\hline
Column1 & Column2 & Column3  \\
\hline
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\ 
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    \hline

\end{longtabu}
 \end{landscape}

\end{document}

但是,如果我在手稿模式下切换到 apa6 类,我会收到一堆错误

Line 36 Misplaced \cr \end{longtabu}
Line 36 Misplaced \cr \end{longtabu}
Line 36 Misplaced \cr \end{longtabu}
Line 36 Undefined control sequence \end{longtabu}
Line 37 Undefined control sequence \end{landscape}

这个脚本给我带来了麻烦:

\documentclass[man]{apa6}
\usepackage{longtable}
\usepackage{threeparttablex}
\usepackage{lscape}
\usepackage{tabu}
\begin{document}
\begin{landscape}
\begin{longtabu}{XXX} 
\caption{test} \\
\hline
Column1 & Column2 & Column3  \\
\hline
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\ 
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    \hline

\end{longtabu} % line 36
\end{landscape}    % line 37

\end{document}

我猜想 endfloat 可能与我的问题有关,或者与我加载了“longtable”有关,但我不知道具体的问题或如何解决它们。任何帮助都将不胜感激!

答案1

tabu不幸的是,它做了很多定义,导致它与其他包不兼容。底层longtable代码在您的示例文件上运行正常,没有错误。

在此处输入图片描述

\documentclass[man]{apa6}
\usepackage{longtable}
\usepackage{threeparttablex}
\usepackage{lscape}
\usepackage{tabu}
\begin{document}
\shorttitle{zz}
\begin{landscape}

\begin{longtable}{ccc} 
\caption{test} \\
\hline
Column1 & Column2 & Column3  \\
\hline
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\ 
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    Column1 & Column2 & Column3  \\
    \hline

\end{longtable} % line 36
\end{landscape}    % line 37

\end{document}

相关内容