天天看點

latex表格添加注腳并左對齊

\begin{table}[h]
\begin{threeparttable}    %增加注腳用
\centering
\caption{An overview of the dataset after pre-processing\protect\footnotemark[1]}
\label{tab_overview}
\setlength{\tabcolsep}{6.1pt}   %列寬
\begin{tabular}{@{}lcccccc@{}}  %加“@{}”左對齊貼緊
\toprule
\multirow{2}{*}{Region} &
  \multicolumn{2}{c}{Number of types} &
  \multicolumn{2}{c}{Quantity} &
  \multicolumn{2}{c}{Proportion (\%)} \\ \cmidrule(l){2-7} 
 &
  \multicolumn{1}{c}{Device} &
  \multicolumn{1}{c}{Event} &
  \multicolumn{1}{c}{Event} &
  \multicolumn{1}{c}{Interval} &
  \multicolumn{1}{c}{Q} &
  \multicolumn{1}{c}{D} \\ \midrule
R1 & 4 & 13 & 604907  & 604906  & 86 & 82 \\
R2 & 4 & 11 & 462694  & 462693  & 89 & 83 \\
R3 & 2 & 13 & 394688  & 394688  & 92 & 95 \\
R4 & 5 & 9  & 67044   & 67043   & 82 & 81 \\
R5 & 4 & 13 & 76063   & 76062   & 91 & 86 \\
R6 & 4 & 10 & 144690  & 144689  & 83 & 84 \\
R7 & 3 & 8  & 89568   & 89567   & 81 & 84 \\
R8 & 7 & 21 & 2723861 & 2723860 & 89 & 87 \\ \bottomrule
\end{tabular}
\begin{tablenotes}[para,flushleft]  %增加注腳用
        \item $Q$ = “$Quantity$”, $D$ = “$Duration$”
     \end{tablenotes} %增加注腳用
\end{threeparttable} %增加注腳用
\end{table}
           

直接上編譯好的成品

latex表格添加注腳并左對齊

主要是第二行的

和倒數2-5行的

\begin{tablenotes}[para,flushleft]  %增加注腳用,“[]”是左對齊的
        \item $Q$ = “$Quantity$”, $D$ = “$Duration$”
     \end{tablenotes} %增加注腳用
\end{threeparttable} %增加注腳用
           

沒有

\usepackage{threeparttable}

這個包的一定在前文要聲明導入這個包