请问如何在表格中写脚注?我想在单元格中输入 [1],这是表格下方文本的链接。谢谢
\documentclass{article}
\usepackage{array}
\usepackage{makecell, multirow, booktabs}
\usepackage{caption}
\begin{document}
\begin{table}[h]
\centering
\caption{title}
\footnotesize\setlength{\extrarowheight}{2pt}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multicolumn{3}{|c|}{[1]} & \multicolumn{2}{c|}{C} & R & \multicolumn{3}{c|}{P} \\
\hline
\multicolumn{3}{|c|}{} & \multirow{2}{*}{~}& & & \multicolumn{3}{c|}{}\\
\cline{1-3} \cline{7-9}
& & & & & & & & \\
\hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \\
\hline
\end{tabular}
\label{table}
\end{table}
\multicolumn{9}{\footnotesize Čísla }
\end{document}
答案1
- 不太清楚你喜欢怎样的脚注
- 您
\threepartttable
可以获得以下信息:
\documentclass{article}
\usepackage{booktabs, makecell, multirow, threeparttable}
\usepackage{caption}
\begin{document}
\begin{table}[ht]
\centering
\caption{title}
\label{tab:mythreeparttable}
\footnotesize % used font size
\setlength{\extrarowheight}{2pt}
\begin{threeparttable}
\begin{tabular}{| *{11}{c|} }
\hline
\multicolumn{3}{|c|}{A\tnote{a}} & \multicolumn{2}{c|}{C} & R & \multicolumn{3}{c|}{P} \\
\hline
\multicolumn{3}{|c|}{} & \multirow{2}{*}{~}& & & \multicolumn{3}{c|}{}\\
\cline{1-3} \cline{7-9}
& & & & & & & & \\
\hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \\
\hline
\end{tabular}
\begin{tablenotes}[para,flushleft]
\item[a] text of the footnotes
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
如果你喜欢在括号中添加脚注,那么可以在序言中添加
\renewcommand\tnote[1]{\textsuperscript{[#1]}}
您将获得:
编辑:如果您希望表格中使用正常字体大小,而只使用\footnotesize
带字体的脚注,则将命令\footnotesize
从表格开头移动到表格注释(参见@Mico 评论):
\documentclass{article}
\usepackage{booktabs, makecell, multirow, threeparttable}
\renewcommand\tnote[1]{\textsuperscript{[#1]}}
\usepackage{caption}
\begin{document}
\begin{table}[ht]
\centering
\caption{title}
\label{tab:mythreeparttable}
\setlength{\extrarowheight}{2pt}
\begin{threeparttable}
\begin{tabular}{| *{11}{c|} }
\hline
\multicolumn{3}{|c|}{A\tnote{a}} & \multicolumn{2}{c|}{C} & R & \multicolumn{3}{c|}{P} \\
\hline
\multicolumn{3}{|c|}{} & \multirow{2}{*}{~}& & & \multicolumn{3}{c|}{}\\
\cline{1-3} \cline{7-9}
& & & & & & & & \\
\hline
col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 &col9 \\
\hline
\end{tabular}
\begin{tablenotes}[para,flushleft]\footnotesize
\item[a] text of the footnotes
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}