2009-08-30 89 views
137

如何参考表格编号以便获得Table 7例如?参考LaTeX中的表格

的样本数据

Table \ref{table:questions} lorem lorem ipsun. 

\begin{table} 
\label{table:questions} 
\begin{tabular}{| p{5cm} | p{5cm} | p{5cm} |} 
    -- cut -- 
\end{tabular} 
\end{table} 

我得到

Table 2.5 lorem lorem ipsun. 

,其中2.5是章节号。

+0

这个问题似乎是脱离主题,因为它是关于乳胶。 – Flexo 2014-07-06 23:36:37

回答

262

您必须将标签放置在标题后面,以便label存储表格的编号,而不是章节的编号。

 
\begin{table} 
\begin{tabular}{| p{5cm} | p{5cm} | p{5cm} |} 
    -- cut -- 
\end{tabular} 
\caption{My table} 
\label{table:kysymys} 
\end{table} 

Table \ref{table:kysymys} on page \pageref{table:kysymys} refers to the ...