1

Is this possible?

\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 is based on this answer.

  • Longtable isn't float environment. You can move it start to the top next page with clearpage, however page before it will have empty space ... If the table is shorter than 1 page, than you can use standard threeparttable in table environment, which can float. – Zarko Jul 21 '16 at 9:12
  • @Zarko afterpage can help.... – David Carlisle Jul 21 '16 at 12:58
  • I try with \afterpage{\clearpage} , however now I see, where I make error in its use! So, your answer is very valuable to me to (+1) ! AT least I should read documentation again ... – Zarko Jul 21 '16 at 14:53
2

If you are feeling brave you can defer a longtable until the next natural pagebreak using \afterpage

enter image description here

\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}
| improve this answer | |

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.