apa6 中旋轉長桌的定位

apa6 中旋轉長桌的定位

我正在用 LaTeX 中的 apa6 包完成一篇手稿。一切都很順利,除了一件事:我需要放置一個旋轉長桌在手稿的最後。該表本身可以工作並且沒有問題,但當我刪除該選項時,它不會移動到手稿的末尾floatsintext(但是,文檔中的所有其他表都會移動到手稿的末尾)。我認為問題在於 longtable 位於landscape- 環境中,這顯然不被 apa6 識別。landscape用或類似的東西替換sidewaystable是行不通的。我很高興就如何在 apa6 中使這個廣泛的長桌工作提出任何建議。

最小的例子:

\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}

答案1

這似乎有效,但前提是您只對錶格使用橫向。

我對 apa6 不熟悉,但我懷疑您添加的許多軟體包都是自動加載的。您可以嘗試在文件中一次註解掉它們,看看是否出現任何錯誤。

\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}

相關內容