我有一张这样的桌子:
\documentclass[]{article}
\usepackage{booktabs}
\begin{document}
\begin{table}[!htb]
\centering
\caption{}
\label{AUC Interpretation}
\begin{tabular}{@{}lcc@{}}
\toprule
\multicolumn{1}{c}{\textbf{AUC}}
& \textbf{\begin{tabular}[c]{@{}c@{}}Interpretation\end{tabular}} \\
\midrule
\begin{tabular}[c]{@{}l@{}}.50\end{tabular} & Chance \\ \midrule
\begin{tabular}[c]{@{}l@{}}.70\end{tabular} & Acceptable \\ \midrule
\begin{tabular}[c]{@{}l@{}}.75\end{tabular} & Large \\ \midrule
\begin{tabular}[c]{@{}l@{}}.80\end{tabular} & Excellent \\ \midrule
\begin{tabular}[c]{@{}l@{}}.90 and higher\end{tabular} & Outstanding
\\ \bottomrule
\end{tabular}
\end{table}
\end{document}
答案1
您可以使用caption
包来实现这一点。嵌套表格不是必需的。
\documentclass{article}
\usepackage{booktabs}
\usepackage{caption}
\captionsetup[table]{
labelsep=newline,
justification=justified,
singlelinecheck=false,
textfont=it,
}
\begin{document}
\begin{table}[!htb]
\centering
\caption{AUC Interpretation}
\label{tab:auc-interpretation}
\begin{tabular}{@{}lc@{}}
\toprule
\multicolumn{1}{c}{\textbf{AUC}} & \textbf{Interpretation} \\
\midrule
.50 & Chance \\
\midrule
.70 & Acceptable \\
\midrule
.75 & Large \\
\midrule
.80 & Excellent \\
\midrule
.90 and higher & Outstanding \\
\bottomrule
\end{tabular}
\end{table}
\end{document}