我的主要文本使用 1.5 倍行距,现在表格下方的注释也是 1.5 倍行距。我希望它们采用单倍行距(我的其他所有表格都没有这个问题)。如果我只是在 threeparttable 中使用 tabular 环境,我就会得到我想要的脚注外观,但我似乎无法为这个表格重现单倍行距。我该如何修复这个表格的代码,以便我可以将表格拉伸到页面文本的宽度,但我的脚注以单倍行距显示在表格下方?任何帮助都将不胜感激。
\documentclass{report}
% packages
\usepackage{amsmath} % Extra math definitions
\usepackage{graphics} % PostScript figures
\usepackage{setspace} % 1.5 spacing
\usepackage{longtable,threeparttablex} % Tables spanning pages
\usepackage{color}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage[colorlinks=true,linkcolor=red,citecolor=blue,hyperfigures=true]{hyperref}
\usepackage{array}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\usepackage{subcaption}
\usepackage{pdfpages}
\usepackage[notes,backend=bibtex]{biblatex-chicago}
\addbibresource{dissbiblio.bib}
\addbibresource{}
\usepackage[utf8]{inputenc}
\usepackage[full]{textcomp}
\usepackage[T1]{fontenc}
\usepackage{afterpage}
\usepackage{float}
\usepackage{fp}
\usepackage{pdflscape} %To rotate pages with sideways tables or large figures.
\usepackage{xparse}
\usepackage{siunitx} %Lets tables align columns by decimal point.
\usepackage{lmodern}
\usepackage[french,english]{babel}
\usepackage{caption}
\usepackage{pifont}
\usepackage{microtype}
\usepackage{amssymb}
\usepackage{arydshln}
\usepackage{cleveref}
\usepackage[bottom]{footmisc} %This places footnotes at the bottom so figures will appear above footnotes.
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\DisableLigatures[f]{encoding=T1}
\crefformat{footnote}{#2\footnotemark[#1]#3}
%Let tables fit to width of page.
\newcommand\totextwidth[1]{%
\sbox{\mytabularbox}{#1}%
\figwidthc=\wd\mytabularbox%
\textwidthc=\textwidth%
\FPdiv\scaleratio{\the\textwidthc}{\the\figwidthc}%
\FPmin\scaleratio{\scaleratio}{1}%
\scalebox{\scaleratio}{\usebox{\mytabularbox}}%
}
\begin {document}
\onehalfspacing
\afterpage{
\begin{ThreePartTable}
\setlength{\LTleft}{0pt}
\setlength{\LTright}{0pt}
\renewcommand\TPTminimum{\textwidth}
\renewcommand{\arraystretch}{0.8}
\begin{TableNotes}[flushleft]
\small
\item \textsuperscript{a} \textit{Event Density} (1.5) refers to the number of notes identified in a 1.5 s window starting from the onset of cadential arrival.
\item \textsuperscript{b} \textit{Caesura} refers to the presence of a rest across all four instrumental parts.
\item \textsuperscript{c} \textit{Elision} refers to the superposition of a new intrathematic phrase at the moment of cadential arrival, an accompanimental overlap in the bass, or a melodic lead-in.
\item \textsuperscript{d} \textit{Interthematic Function} refers to one of the following temporal functions to characterize the passage at the theme level following cadential arrival: Before-the-Beginning, Beginning, Middle, End, After-the-End. \textit{Intrathematic Function} refers to either the Beginning, Middle, or End functions that characterize the passage at the phrase level following cadential arrival.
\end{TableNotes}
\begin{longtable}{@{\hskip\tabcolsep\extracolsep\fill}lccc}
\caption{Descriptive statistics for the 11 retrospective features.} \\
\toprule
\textit{Retrospective Features} & \multicolumn{1}{c}{\textit{M} (\textit{SD})} & \multicolumn{1}{c}{\textit{Range}} &
\multicolumn{1}{c}{\textit{Mode} (\textit{Frequency})} \\
\midrule
\textbf{Segmentational Grouping} & & & \textbf{} \\
\multicolumn{1}{l}{\quad (1) \textit{Next Note Onset} (s)} & \multicolumn{1}{c}{.57 (.44)} & \multicolumn{1}{c}{.1-1.8} & \multicolumn{1}{c}{} \\
\multicolumn{1}{l}{\quad (2) \textit{Next Bass Note Onset} (s)} & \multicolumn{1}{c}{.97 (.77)} & \multicolumn{1}{c}{.1-2.8} & \multicolumn{1}{c}{} \\
\multicolumn{1}{l}{\quad (3) \textit{Next Soprano Note Onset} (s)} & \multicolumn{1}{c}{.99 (.66)} & \multicolumn{1}{c}{.1-2.6} & \multicolumn{1}{c}{} \\
\multicolumn{1}{l}{\quad (4) \textit{Event Density}\textsuperscript{a}} & \multicolumn{1}{c}{9.98 (5.25)} & \multicolumn{1}{c}{3-19} & \multicolumn{1}{c}{} \\
\multicolumn{1}{l}{\quad (5) \textit{Caesura}\textsuperscript{b}} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{Absent (28)} \\
\multicolumn{1}{l}{\quad (6) \textit{Elision}\textsuperscript{c}} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{None (26)} \\
\textbf{Temporal Function} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} \\
\multicolumn{1}{l}{\quad (7) \textit{Interthematic Function}\textsuperscript{d}} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{End (20)} \\
\multicolumn{1}{l}{\quad (8) \textit{Intrathematic Function}} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{Beginning (19)} \\
\multicolumn{1}{l}{\quad (9) \textit{ Repetition}} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{Present (25)} \\
\multicolumn{1}{l}{\quad (10) \textit{Stimulus Length} (s)} & \multicolumn{1}{c}{15.68 (4.14)} & \multicolumn{1}{c}{9.2-27.6} & \multicolumn{1}{c}{} \\
\multicolumn{1}{l}{\quad (11) \textit{Stimulus Length from CA} (s)} & \multicolumn{1}{c}{7.20 (2.15)} & \multicolumn{1}{c}{3.6-14.1} & \multicolumn{1}{c}{} \\
\bottomrule
\insertTableNotes
\end{longtable}
\label{tab:ex2rhetorical}%
\end{ThreePartTable}
}
\end{document}
答案1
(旁白:在 OP 指出他/她用来更改文档默认行距的方法以及使代码可编译所需的包后,我进行了大量更新/简化。)
我有几点建议:
由于您正在使用
setspace
包和指令\onehalfspacing
来更改整个文档的默认行距,因此您可以\singlespacing
在环境启动后插入指令ThreePartTable
以在本地切换到单倍行距。longtable
由于所有这些\multicolumn{1}{l}{...}
和包装器,环境的内容变得不必要地复杂\multicolumn{1}{c}{...}
。据我所知,这些包装器是不必要的。(它们只会造成代码混乱。)由于您正在使用该
threeparttablex
包,因此您可以编写\tnote{a}
和,\item[a]
而不是更费力的\textsuperscript{a}
和\item \textsuperscript{a}
等。
这是您提供的示例代码的简化版本。我注释掉了加载 MWE 中实际未使用的包的指令。顺便说一句,由于包会加载,因此单独加载graphics
和是没有意义的。同样,如果您还要加载,请不要加载。graphicx
rotating
graphicx
color
xcolor
\documentclass{report}
% packages
%\usepackage{amsmath} % Extra math definitions
%\usepackage{graphics} % PostScript figures
\usepackage{setspace} % 1.5 spacing
\usepackage{longtable,threeparttablex} % Tables spanning pages
%\usepackage{color}
%\usepackage{graphicx}
%\usepackage{rotating}
%\usepackage{array}
%\usepackage{multirow}
\usepackage{booktabs}
%\usepackage[table]{xcolor}
%\usepackage{subcaption}
%\usepackage{pdfpages}
%\usepackage[notes,backend=bibtex]{biblatex-chicago}
%\addbibresource{dissbiblio.bib}
%\addbibresource{}
\usepackage[utf8]{inputenc}
%\usepackage[full]{textcomp}
\usepackage[T1]{fontenc}
\usepackage{afterpage}
%\usepackage{float}
%\usepackage{fp}
%\usepackage{pdflscape} %To rotate pages with sideways tables or large figures.
%\usepackage{xparse}
%\usepackage{siunitx} %Lets tables align columns by decimal point.
%\usepackage{lmodern}
%\usepackage[french,english]{babel}
%\usepackage{caption}
%\usepackage{pifont}
%\usepackage{microtype}
%\usepackage{amssymb}
%\usepackage{arydshln}
%\usepackage[bottom]{footmisc} %This places footnotes at the bottom so figures will appear above footnotes.
%\usepackage[colorlinks=true,linkcolor=red,citecolor=blue,hyperfigures=true]{hyperref}
%\usepackage{cleveref}
%\newcommand{\tabitem}{~~\llap{\textbullet}~~}
%\DisableLigatures[f]{encoding=T1}
%\crefformat{footnote}{#2\footnotemark[#1]#3}
%
%%Let tables fit to width of page.
%\newcommand\totextwidth[1]{%
%\sbox{\mytabularbox}{#1}%
%\figwidthc=\wd\mytabularbox%
%\textwidthc=\textwidth%
%\FPdiv\scaleratio{\the\textwidthc}{\the\figwidthc}%
%\FPmin\scaleratio{\scaleratio}{1}%
%\scalebox{\scaleratio}{\usebox{\mytabularbox}}%
%}
\begin {document}
\onehalfspacing
\afterpage{%
\begin{ThreePartTable}
\singlespacing % switch locally to single-spacing
\setlength{\LTleft}{0pt}
\setlength{\LTright}{0pt}
\renewcommand\TPTminimum{\textwidth}
%\renewcommand{\arraystretch}{0.8} % not necessary, is it?
\begin{TableNotes}[flushleft]
\small
\item[a] \textit{Event Density} (1.5) refers to the number of notes identified in a 1.5~s window starting from the onset of cadential arrival.
\item[b] \textit{Caesura} refers to the presence of a rest across all four instrumental parts.
\item[c] \textit{Elision} refers to the superposition of a new intrathematic phrase at the moment of cadential arrival, an accompanimental overlap in the bass, or a melodic lead-in.
\item[d] \textit{Interthematic Function} refers to one of the following temporal functions to characterize the passage at the theme level following cadential arrival: Before-the-Beginning, Beginning, Middle, End, After-the-End.
\textit{Intrathematic Function} refers to either the Beginning, Middle, or End functions that characterize the passage at the phrase level following cadential arrival.
\end{TableNotes}
\setlength\tabcolsep{0.1pt} % default value: 6pt
\begin{longtable}{@{\extracolsep\fill}lccc} % make longtable span width of text block
\caption{Descriptive statistics for the 11 retrospective features.} \label{tab:ex2rhetorical}\\
\toprule
\textit{Retrospective Features}
& \textit{M} (\textit{SD})
& \textit{Range}
& \textit{Mode} (\textit{Frequency}) \\
\midrule
\textbf{Segmentational Grouping} & & & \\
\quad (1) \textit{Next Note Onset} (s) & .57 (.44) & .1--1.8 & \\
\quad (2) \textit{Next Bass Note Onset (s)} & .97 (.77) & .1--2.8 & \\
\quad (3) \textit{Next Soprano Note Onset} (s) & .99 (.66) & .1--2.6 & \\
\quad (4) \textit{Event Density}\tnote{a} & 9.98 (5.25) & 3--19 & \\
\quad (5) \textit{Caesura}\tnote{b} & & & Absent (28) \\
\quad (6) \textit{Elision}\tnote{c} & & & None (26) \\
\textbf{Temporal Function} & & & \\
\quad (7) \textit{Interthematic Function}\tnote{d} & & & End (20) \\
\quad (8) \textit{Intrathematic Function} & & & Beginning (19) \\
\quad (9) \textit{Repetition} & & & Present (25) \\
\quad (10) \textit{Stimulus Length} (s) & 15.68 (4.14) & 9.2--27.6 & \\
\quad (11) \textit{Stimulus Length from CA} (s) & 7.20 (2.15) & 3.6--14.1 & \\
\bottomrule
\insertTableNotes
\end{longtable}
\end{ThreePartTable}
}
\end{document}