表格列表中第一个表格格式错误

表格列表中第一个表格格式错误

我有一篇 31 页的论文,表格列表有问题。本节列出了 6 个表格中的 5 个,但第一个表格只有“10table.1”,这毫无意义。我检查了代码,但它与其他表格类似。你认为这里的问题是什么?非常感谢!在此处输入图片描述

\begin{table}[ht]
\centering
\caption{Distribution of financial misconduct cases by year\footnote{Year refers to the initial investigation of the crime by SEC}}\\ [1ex]
\begin{tabular}{|| l | c | l | c ||}
\hline
Year &  Number of cases & Year  & Number       of cases \\ [0.5ex]
\hline\hline
1999    & 3 & 2010  & 9\\
\hline
2000    & 5 & 2011  & 7\\
\hline
2001    & 3 & 2012  & 5\\
\hline
2002    & 11    & 2013  & 6\\
\hline
2003    & 12    & 2014  & 7\\
\hline
2004    & 8 & 2015  & 5\\
\hline
2005    & 10    & 2016  & 14\\
\hline
2006    & 10    & 2017  & 5\\
\hline
2007    & 17    & 2018  & 20\\
\hline
2008    & 9 & 2019  & 17\\
\hline
2009    & 14    & 2020  & 16\\
\hline
\end{tabular}\\ [1ex]

Source: AAER
\label{table:1}
\end{table}  

我的代码唯一的问题是脚注。其他一切都很好。

答案1

你没有提供真正的测试,但如果我把你的例子完成到文档中

\documentclass{article}

\begin{document}

\listoftables

\begin{table}[ht]
\centering
\caption{Distribution of financial       misconduct cases by year\footnote{Year refers to the initial investigation of the crime by SEC}}\\ [1ex]
\begin{tabular}{|| l | c | l | c ||}
\hline
Year &  Number of cases & Year  & Number       of cases \\ [0.5ex]
\hline\hline
1999    & 3 & 2010  & 9\\
\hline
2000    & 5 & 2011  & 7\\
\hline
2001    & 3 & 2012  & 5\\
\hline
\end{tabular}\\ [1ex]

Source: AAER
\label{table:1}
\end{table}  

\end{document}

我明白了

! Argument of \@caption has an extra }.
<inserted text> 
                \par 
l.9 ...initial investigation of the crime by SEC}}
                                                  \\ [1ex]
? 

如果你得到任何错误您所展示的 pdf 输出并非可用,仅作为调试辅助。

您不希望表格列表中出现脚注,因此

\caption
 [Distribution of financial misconduct cases by year]
 {Distribution of financial misconduct cases by year\footnote{Year refers to the initial investigation of the crime by SEC}}

然后你得到

! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.11 ...tial investigation of the crime by SEC}}\\
                                                   [1ex]
? 

从放错的地方\\删除那些

然后它运行没有错误,但最好不要使用数字\label,所以\label{table:misconduct}

\documentclass{article}

\begin{document}

\listoftables

\begin{table}[ht]
\centering
\caption
 [Distribution of financial misconduct cases by year]
 {Distribution of financial misconduct cases by year\footnote{Year refers to the initial investigation of the crime by SEC}}
\begin{tabular}{|| l | c | l | c ||}
\hline
Year &  Number of cases & Year  & Number       of cases \\ [0.5ex]
\hline\hline
1999    & 3 & 2010  & 9\\
\hline
2000    & 5 & 2011  & 7\\
\hline
2001    & 3 & 2012  & 5\\
\hline
\end{tabular}

Source: AAER
\label{table:misconduct}
\end{table}  

\end{document}

在此处输入图片描述

相关内容