1. 问题描述
如下图所示,使用Latex
输出如下样式的表格,需要在表格下方加入注脚,如何操作?

原始表格的代码如下:
\begin{table}[]
\begin{tabular}{cccc}
\hline
& B1 &B2 & B3\\ \hline
A1 & 0.1 & 0.2 & 0.3\\
A2 & ... & .. & .\\
A3 & .. & . & .\\ \hline
\end{tabular}
\end{table}
2. 解决方案
- 首先,在
Latex
的load packges
部分导入threeparttable
包
\usepackage{threeparttable}
- 原始表格代码中,加入注脚,代码更改如下:
\begin{table}[]
\begin{threeparttable} %添加此处
\begin{tabular}{cccc}
\hline
& B1 &B2 & B3\\ \hline
A1 & 0.1 & 0.2 & 0.3\\
A2 & ... & .. & .\\
A3 & .. & . & .\\ \hline
\end{tabular}
\begin{tablenotes} %添加此处
\item here are tablenotes. %添加此处
\end{tablenotes} %添加此处
\end{threeparttable} %添加此处
\end{table}
得到如下已添加注脚的表格:

问题解决,完结撒花!