我对这张表有很多疑问。
(1) 目前它不会跨越两页,我知道我需要使用 longtable 包,但我知道 APA7 文档类包中存在这个问题。
longtable:如果您必须使用长表格(长度超过一页),请尝试此选项(但它可能不适用于所有情况)。由于 endfloat 包的优先级要求,请勿自行加载 longtable。将文件 APA7endfloat.cfg 从 apa 安装的“config”文件夹复制到文档的工作文件夹(而不是在 texmf 树中),然后将其重命名为 endfloat.cfg,以便 endfloat 可以识别它。提供的 APA7endfloat.cfg 文件还需要与 spinning 包(及其 \sideways 命令)结合使用以生成旋转表格;这仅适用于 man 和 stu 模式。对于 jou 或 doc 模式下的旋转表格,可以使用 spinning 包。如果使用 floatsintext 选项将侧向表格推到文档末尾,请尝试对侧向表格使用 ph! 位置说明符;例如 \begin{sidewaystable}[ph!]。
(2)我希望 N 列中的数字与主题列一致且居中。
\documentclass[man, biblatex, floatsintext, hidelinks, 12pt, draftfirst]{apa7}
\usepackage[style=apa, sortcites=true,sorting=nyt]{biblatex}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{pdflscape}
\usepackage{csquotes}
\usepackage{multirow}
\usepackage[formats]{listings}
\addbibresource{thesis.bib}
\begin{table}[htpb]
\caption{Sub-themes and quotes}
\label{tab:themes-proto}
\begin{tabular}{p{0.35\linewidth} p{0.05\linewidth} p{0.55\linewidth}}
\toprule
\multicolumn{1}{c}{Themes} & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Sub-themes} \\
\hline
-
\multirow{5}{\linewidth}{1. Personal Characteristics and Dispositions} & 47 & 1a. Detachment, robustness and emotional maturity\\
& ~ & 1b. Interpersonal skills\\
& ~ & 1c. Openness and mental flexibility\\
& ~ & 1d. Moderation in personality\\
& ~ & 1e. Effective communication, calmness and confidence\\
\noalign{\bigskip}
\multirow{6}{\linewidth}{2. Crew Coordination and Cohesion} & 41 & 2a. Shared motivations and experiences\\
& ~ & 2b. Hierarchy and work culture\\
& ~ & 2c. Construction of mental model\\
& ~ & 2d. Collective decision-making\\
& ~ & 2e. Debriefing as a mechanism to evaluate decisions\\
& ~ & 2f. Communication facilitates coordination\\
\noalign{\bigskip}
\multirow{6}{\linewidth}{3. Adaptive Planning} & 39 & 3a. Resource Awareness\\
& ~ & 3b. Constant information gathering practice\\
& ~ & 3c. Dealing with changes in circumstance\\
& ~ & 3d. Creative and flexible approaches\\
& ~ & 3e. Formulation of a working plan\\
& ~ & 3f. Adopting a mental picture of the plan\\
\noalign{\bigskip}
\multirow{5}{\linewidth}{4. Domain Expertise and Currency} & 38 & 4a. Proficiency through time and experience\\
& ~ & 4b. Constant information gathering practice\\
& ~ & 4c. Training to maintain currency\\
& ~ & 4d. Standard procedures as a foundation for automaticity\\
& ~ & 4e. Cognitive availability as a product of familarity\\
& ~ & 4f. Shared understanding of experience and perspective\\
\noalign{\bigskip}
\multirow{3}{\linewidth}{5. Metacognition and Workload Management} & 37 & 5a. Awareness of cognitive limitations\\
& ~ & 5b. Strategies for maintaining alertness\\
& ~ & 5c. Availability of cognitive badwidth\\
\noalign{\bigskip}
\multirow{3}{\linewidth}{6. Threat Assessment and Management} & 34 & 6a. Strategies for managing risk\\
& ~ & 6b. Awareness of external factors and threats\\
& ~ & 6c. Crew and environmental factors\\
\end{tabular}
\tablenote{N refers to number times a theme presented in the data set}
\end{table}
答案1
- 您是否尝试过 AP7 提供的方案(复制文件 APA7endfloat.cfg)?如果您尝试过,它有效。
- 我建议使用
\multirow{<n>}{=}
而不是\multirow{<n>}{\linewidth}
,因为这是 中的正常用法multirow
。 - 为了使 N 列中的数字垂直居中,请将它们放置在
\multirow
与行中第一个条目相同的位置。 - 最右侧列中的某些“块”出现换行,然后该块中的总行数大于
\multirow
第一列中的行数。这导致左列单元格不再正确垂直居中。请更正该\multirow
数字,使其等于右列的实际行数。 - 为了防止分页符落在“块”的中间(例如,在本例中位于 4a 和 4f 之间),请用 而不是 结束块的所有行(最后一行除外)
\\*
。\\
我建议对所有此类块都这样做,因为您不知道分页符会落在最终文档的何处。 - 不要包含
\usepackage{biblatex}
您自己,而是biblatex
在 documentclass 选项中包含其选项。
这让我想到了以下解决方案。
\documentclass[man, longtable, biblatex, floatsintext, hidelinks, 12pt, draftfirst,style=apa, sortcites=true,sorting=nyt]{apa7}
%\usepackage[style=apa, sortcites=true,sorting=nyt]{biblatex}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{pdflscape}
\usepackage{csquotes}
\usepackage{multirow}
\usepackage[formats]{listings}
\addbibresource{thesis.bib}
\usepackage{lipsum}
\title{My Title}
\shorttitle{Title}
\begin{document}
\lipsum[1]
\begin{longtable}{p{0.35\linewidth} p{0.05\linewidth} p{0.55\linewidth}}
\caption{Sub-themes and quotes}
\label{tab:themes-proto}\\
\toprule
\multicolumn{1}{c}{Themes} & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Sub-themes} \\
\hline
\endfirsthead
\caption{Sub-themes and quotes (continued)}\\
\toprule
\multicolumn{1}{c}{Themes} & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Sub-themes} \\
\hline
\endhead
\multirow{7}{=}{1. Personal Characteristics and Dispositions} & \multirow{7}{=}{47} & 1a. Detachment, robustness and emotional maturity\\*
& ~ & 1b. Interpersonal skills\\*
& ~ & 1c. Openness and mental flexibility\\*
& ~ & 1d. Moderation in personality\\*
& ~ & 1e. Effective communication, calmness and confidence\\
\noalign{\bigskip}
\multirow{6}{=}{2. Crew Coordination and Cohesion} & \multirow{6}{=}{41} & 2a. Shared motivations and experiences\\*
& ~ & 2b. Hierarchy and work culture\\*
& ~ & 2c. Construction of mental model\\*
& ~ & 2d. Collective decision-making\\*
& ~ & 2e. Debriefing as a mechanism to evaluate decisions\\*
& ~ & 2f. Communication facilitates coordination\\
\noalign{\bigskip}
\multirow{6}{=}{3. Adaptive Planning} & \multirow{6}{=}{39} & 3a. Resource Awareness\\*
& ~ & 3b. Constant information gathering practice\\*
& ~ & 3c. Dealing with changes in circumstance\\*
& ~ & 3d. Creative and flexible approaches\\*
& ~ & 3e. Formulation of a working plan\\*
& ~ & 3f. Adopting a mental picture of the plan\\
\noalign{\bigskip}
\multirow{8}{=}{4. Domain Expertise and Currency} & \multirow{8}{=}{38} & 4a. Proficiency through time and experience\\*
& ~ & 4b. Constant information gathering practice\\*
& ~ & 4c. Training to maintain currency\\*
& ~ & 4d. Standard procedures as a foundation for automaticity\\*
& ~ & 4e. Cognitive availability as a product of familarity\\*
& ~ & 4f. Shared understanding of experience and perspective\\
\noalign{\bigskip}
\multirow{3}{=}{5. Metacognition and Workload Management} & \multirow{3}{=}{37} & 5a. Awareness of cognitive limitations\\*
& ~ & 5b. Strategies for maintaining alertness\\*
& ~ & 5c. Availability of cognitive badwidth\\
\noalign{\bigskip}
\multirow{3}{=}{6. Threat Assessment and Management} & \multirow{3}{=}{34} & 6a. Strategies for managing risk\\*
& ~ & 6b. Awareness of external factors and threats\\*
& ~ & 6c. Crew and environmental factors\\
\tablenote{N refers to number times a theme presented in the data set}
\end{longtable}
\end{document}