【发布时间】:2015-08-20 17:15:52
【问题描述】:
我想在 \enumerate 环境中插入一个 \table,我有这样的东西:
\begin{enumerate}
\item Item 1.
\item Item 2.
\item \begin{table}[htbp]
\textbf{\caption{Table1 Caption}}
\centering
\begin{tabular}{c c}
\hline\hline
Value 1 & Value 2\\
\hline
r1c1 & r2c2\\
r2c1 & r2c2\\
r3c1 & r3c2\\
\hline
\end{tabular}
\label{table1}
\end{table}
\item \begin{table}[htbp]
\textbf{\caption{Table 2 Caption}}
\centering
\begin{tabular}{ccc}
\hline\hline
Value 1 & Value 2 & Value 3\\
\hline
r1c1 & r1c2 & r1c3\\
r2c1 & r2c2 & r2c3\\
r3c1 & r3c2 & r3c3\\
\end{tabular}
\label{table2}
\end{table}
\item \ref{table1} and \ref{table2}
\end{enumerate}
但是当我编译乳胶文档时,\enumerate 数字不在桌子附近。此外,当我提到标签“table1”和“table2”时,它分别显示为 3 和 4(有关额外信息,这部分在 3.3 小节中,这是整个文档中仅有的两个表)。
如何将 \table 环境与 \enumerate 环境一起使用。我见过人们只使用 \tabular 和 \enumerate 但我想使用 \table 因为它给了我一个简单的选项来定义 \caption 和 \label。
关于表格标签,我假设它与小节编号有关,但我无法真正弄清楚。
我非常感谢有关此问题的任何帮助。
【问题讨论】: