# Positioning of rotated longtable in apa6

I am finishing a manuscript with the apa6 package in LaTeX. Everything went fine except one thing: I need to place a rotated longtable at the end of the manuscript. The table itself works and has no problems but it won't move to the end of the manuscript when I remove the option floatsintext (all other tables in the document, however, do). I think the problem is that the longtable is situated in a landscape-environment, which obviously is not recognized by apa6. Replacing landscape with sidewaystable or similar things do not work. I am glad for any suggestions on how to make this wide longtable work in apa6.

Minimal example:

\documentclass[12pt
,man % manuscript mode; jou man doc
,babel, american % language
%,biblatex % loads biblatex or apacite
,a4paper % default:letter
% ,floatsintext
,noextraspace %removes extra space after headings; closer to "true" double-spacing
%,mask
,longtable
%,helv % font in man mode
%,tt   % font in man mode
%,draftfirst
%,draftall
]{apa6}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{threeparttablex}
\usepackage{amsmath}
\usepackage{siunitx}

%% for the huge table to avoid boxes warnings
\newcommand{\rr}{\raggedright}
\newcommand{\tn}{\tabularnewline}

\title{Longtables and Me: An Endless Story}
\shorttitle{Longtables}

\author{Me}
\affiliation{MeU}

\authornote{
Empty
}

\abstract{
Empty.
}

\keywords{Empty}

\begin{document}

\lipsum

\begin{landscape}

\begin{ThreePartTable}

\begin{TableNotes}
\rr \footnotesize %
\textit{Note.}
Just a TableNote to explain some stuff.
\end{TableNotes}

\begin{longtable}{p{7.3cm}
S[table-format = 5]
l
l
S[table-format = 2.2]
c
p{5cm}}

\caption{Longitudinal Studies Included in the Analysis} \\
\label{tab:studies} \\

\toprule
1st Column  & {2nd Column}  &  3rd Column   &  4th Column  &  {5th Column}  &  6th  &  7th Column\\
\midrule
\endfirsthead

\multicolumn{7}{l}{{\tablename} \thetable{} (continued)} \\[0.5ex]

\toprule
1st Column  & {2nd Column}  &  3rd Column   &  4th Column  &  {5th Column}  &  6th  &  7th Column\\
\midrule
\endhead

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry that is quite long and breaks to the next line   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr Another rather long Entry that also breaks and extends over two lines   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\bottomrule

\insertTableNotes

\end{longtable}

\end{ThreePartTable}
\end{landscape}

\lipsum

\end{document}

• can you not simply move it to the end of the source? – David Carlisle Jul 10 '17 at 15:10
• Welcome to TeX SX! Maybe the reason is a longtable is not a float? – Bernard Jul 10 '17 at 15:11
• @DavidCarlisle: This might work, although it would also require moving all tables and figures to the end in order of their appearance in the manuscript. On the downside, it would break the functionality of floatsintext which I tend to like very much when reviewing and sharing documents. – user138936 Jul 10 '17 at 15:15
• @Bernard: Thanks for this comment. apa6 has a good manual in which problems with longtables are discussed. Basically, I can get longtable to float, but not the rotated one. – user138936 Jul 10 '17 at 15:19

## 1 Answer

This seems to work, but only if you only use landscape for tables.

I'm not familiar with apa6, but I suspect that a lot of the packages you are adding are automatically loaded. You might try commenting them out one at a time in you document and see if you get any errors.

\documentclass[12pt
,man % manuscript mode; jou man doc
,babel, american % language
%,biblatex % loads biblatex or apacite
,a4paper % default:letter
% ,floatsintext
,noextraspace %removes extra space after headings; closer to "true" double-spacing
%,mask
,longtable
%,helv % font in man mode
%,tt   % font in man mode
%,draftfirst
%,draftall
]{apa6}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{threeparttablex}
\usepackage{amsmath}
\usepackage{siunitx}

%\usepackage{endfloat}

\DeclareDelayedFloatFlavor*{landscape}{table}

%% for the huge table to avoid boxes warnings
\newcommand{\rr}{\raggedright}
\newcommand{\tn}{\tabularnewline}

\title{Longtables and Me: An Endless Story}
\shorttitle{Longtables}

\author{Me}
\affiliation{MeU}

\authornote{
Empty
}

\abstract{
Empty.
}

\keywords{Empty}

\begin{document}

\listoftables

\begin{table}[htp]
\caption{this is actually a table}
\end{table}

\lipsum[1-3]

\begin{landscape}

\begin{ThreePartTable}

\begin{TableNotes}
\rr \footnotesize %
\textit{Note.}
Just a TableNote to explain some stuff.
\end{TableNotes}

\begin{longtable}{p{7.3cm}
S[table-format = 5]
l
l
S[table-format = 2.2]
c
p{5cm}}

\caption{Longitudinal Studies Included in the Analysis} \\
\label{tab:studies} \\

\toprule
1st Column  & {2nd Column}  &  3rd Column   &  4th Column  &  {5th Column}  &  6th  &  7th Column\\
\midrule
\endfirsthead

\multicolumn{7}{l}{{\tablename} \thetable{} (continued)} \\[0.5ex]

\toprule
1st Column  & {2nd Column}  &  3rd Column   &  4th Column  &  {5th Column}  &  6th  &  7th Column\\
\midrule
\endhead

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry that is quite long and breaks to the next line   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr Another rather long Entry that also breaks and extends over two lines   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\rr An Entry   & 1234  & ABCD    & glo  & 99.32  & 2  & Some more text \\

\bottomrule

\insertTableNotes

\end{longtable}

\end{ThreePartTable}
\end{landscape}

\hrule
\lipsum[1-3]

\end{document}