设置 longtable + ThreePartTable 从下一页顶部开始

设置 longtable + ThreePartTable 从下一页顶部开始

这可能吗?

\documentclass{article}

\usepackage{threeparttable}
\usepackage{dcolumn}
\usepackage{longtable}
\usepackage{threeparttablex}
\usepackage{lipsum}

\begin{document}

\lipsum[2-4]

\begin{ThreePartTable}
    \begin{TableNotes} 
        \small
        \item Note. My table notes here
    \end{TableNotes}
    \begin{longtable}{lrrrrr}
        \caption{My caption}\label{mytbl}\\

        Variable & Mean & SD & Mean & SD & p-value \\

        \endfirsthead

        \endfoot

        \insertTableNotes         
        \endlastfoot

        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\

    \end{longtable}
\end{ThreePartTable}

\lipsum[2-16]

\end{document}

MWE 基于这个答案

答案1

如果你够勇敢,你可以longtable使用以下方法将 a 推迟到下一个自然分页符:\afterpage

在此处输入图片描述

\documentclass{article}

\usepackage{threeparttable}
\usepackage{dcolumn}
\usepackage{longtable}
\usepackage{threeparttablex}
\usepackage{lipsum}
\usepackage{afterpage}

\begin{document}

\lipsum[2-4]

\afterpage{\clearpage
\begin{ThreePartTable}
    \begin{TableNotes} 
        \small
        \item Note. My table notes here
    \end{TableNotes}
    \begin{longtable}{lrrrrr}
        \caption{My caption}\label{mytbl}\\

        Variable & Mean & SD & Mean & SD & p-value \\

        \endfirsthead

        \endfoot

        \insertTableNotes         
        \endlastfoot

        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\
        Variable & 11.11 & 1.11 & 11.11 & 1.11 & 0.111 \\

    \end{longtable}
\end{ThreePartTable}}

\lipsum[2-16]

\end{document}

相关内容