感謝這篇文章長桌與三部曲桌(但我無法評論,因為我是新來的)我發現如果我使用 Threeparttable 包,我可以將腳註與 longtable 一起使用。
但是,我想在筆記上方添加一行。有人知道該怎麼做嗎? (我想要這樣的東西)
這是我的程式碼的範例。表 1(longtable)是帶有 ThreePartTable 套件的腳註的表。它沒有在音符之上。表 2(有小型頁面環境)在註釋上方有一行。我想要表 1 中的類似行。
\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{booktabs,threeparttablex}
\usepackage{etoolbox}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{caption}
\usepackage[labelfont=bf,labelsep=period]{caption}
\begin{document}
\lipsum[2-3]
\begin{ThreePartTable}
\renewcommand\TPTminimum{\textwidth}
\setlength\LTleft{0pt}
\begin{TableNotes}
\item[*] A note adsfasdf
\item[] Another note asdfasfasd
\end{TableNotes}
\begin{longtable}{|l|l|l|l|l|l|}
\caption{\textit{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}} \\
\hline
\textbf{Col1} & \textbf{Col2} & \textbf{Col3\tnote{*}} & \textbf{Col4} & \textbf{Col5} & \textbf{Col6\tnote{}} \\
\hline
\endfirsthead
\multicolumn{6}{l}{\tablename\ \thetable:
\textit{AAAAAAAAAAAAAAA}(Cont\ldots)}\\
\hline
\textbf{Col1} & \textbf{Col2} & \textbf{Col3} & \textbf{Col4} & \textbf{Col5} & \textbf{Col6} \\
\hline
\endhead
\hline \multicolumn{6}{l}{}\\
\endfoot
\insertTableNotes
\endlastfoot
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\multirow{3}{*}{23412} & AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
& AAAA & A & AAAAAAA & AAAAAAA & A \\
\hline
\end{longtable}
\end{ThreePartTable}
\begin{table}[!ht]
\centering
\caption{AAAAAAAAAAAAAAAAAAAA}
\begin{minipage}{\textwidth}
\renewcommand*{\thempfootnote}{\fnsymbol{mpfootnote}}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\textbf{Col1} & \textbf{Col2} & \textbf{Col3\footnote[1]{A note adsfasdf}} & \textbf{Col4} & \textbf{Col5} & \textbf{Col6\footnote[0]{Another note asdfasfasd}} \\
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \\
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \\
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \\
\hline
AAAAAA & AAAAAA & A & AAAAAA & AAAAAA & A \\
\hline
\end{tabular}
\end{minipage}
\end{table}
\end{document}
先致謝!
答案1
感謝伯納德,問題解決了!
使用 ThreePartTable 在腳註上方放置水平線的方法(類似於 minipage 環境的腳註)是:
\noalign {\rule [-1.4ex]{6.7cm}{0.4pt}}