我想创建一个包含解释性文字的表格,如下图所示:
这是我写的代码:
\begin{table}[]
\caption{N-best examples from the MSCOCO test set. Bold lines indicate a
novel sentence not present in the training set.}
\label{table3}
\centering
\resizebox{.90\columnwidth}{!}{%
\begin{tabular}{@{}l@{}}
\toprule
A man throwing a frisbee in a park \\
\textbf{A man throwing a frisbee in a park} \\
\textbf{A man standing in the grass with a frisbee.} \\
A close up of a sandwich on a plate. \\
A close up of a plate of food with french fries. \\
A white plate topped with a cut in half sandwich. \\
A display case filled with lots of donuts. \\
\textbf{A display case filled with lots of cakes.} \\
\textbf{A bakery display case filled with lots of donuts.} \\ \bottomrule
\end{tabular}%
}
\end{table}
我如何才能获取此表中的底线?我试过了\threeparttable
,但似乎会产生错误。有人能演示如何做到这一点吗?
答案1
由于缺乏有关您的文档的任何信息,我只能为您的表格编写以下代码:
编辑: 在我的测试平台上,我添加了相关的包并形成了一个 MWE,任何人都可以测试所提出的解决方案。
\documentclass{article}
\usepackage[labelfont=up,labelsep=newline, skip=1ex]{caption}
\begin{table}[ht]
\centering
\begin{threeparttable}
\caption{N-best examples from the MSCOCO test set.}
\label{table3}
\begin{tabular}{@{}l@{}}
\toprule
A man throwing a frisbee in a park \\
\textbf{A man throwing a frisbee in a park} \\
\textbf{A man standing in the grass with a frisbee.} \\
A close up of a sandwich on a plate. \\
A close up of a plate of food with french fries. \\
A white plate topped with a cut in half sandwich. \\
A display case filled with lots of donuts. \\
\textbf{A display case filled with lots of cakes.} \\
\textbf{A bakery display case filled with lots of donuts.} \\
\bottomrule
\end{tabular}
\begin{tablenotes}[para, flushleft]\itshape
Bold Lines Indicate a Novel Setence not Present in the Training set
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
使用我的测试平台得到的结果为:
这就是你要找的吗?