\ref 到表环境显示为 ?? 尽管所有内容都是正确的

\ref 到表环境显示为 ?? 尽管所有内容都是正确的

我在 Latex 中有一个非常基本的表,创建它然后尝试引用如下:

\documentclass{report}
\usepackage[british]{babel}
\usepackage{cleveref}
\usepackage[T1]{fontenc}

\begin{document}

\begin{table}[!th]
    \centering
    \caption{Credibility of selected library databases.}\label{tab:library-databases}
    \begin{tabular}{| c | p{7.5cm} |}
    \hline
    \multicolumn{1}{| c |}{\textbf{Library database}}
    & \multicolumn{1}{c |}{\textbf{Credibility}}\\
    \hline
    Birmingham City University Library & Part of Birmingham City University, which was established in the UK in
    1843.
    Contains a large amount of resources including database access.  \\ \hline
    Google Scholar & Used primarily to access literature already hosted on other library databases.
    The site does not contain the ability to restricting searching to only peer-reviewed databases, and thus
    could have unreliable content. \\ \hline
    EBSCOhost Research Databases & EBSCOhost hosts high-quality, peer-reviewed content from publishers
    recognised by library professionals. \\ \hline
    IEEE Xplore & Launched in May 2000, this resource primarily contains peer-reviewed materials published by the Institute of Electrical and
    Electronics Engineers (IEEE) and other partners.
    As the resourced are peer reviewed, they can be seen as reliable.\\ \hline
    ResearchGate & ResearchGate restricts its users to published researchers and people at recognised
    institutions and is a widely accredited library database. \\ \hline
    JSTOR & Part of ITHAKA, a non-profit organisation.
    A digital library including thousands of academic journals, books, and primary source documents. \\
    \hline
    \end{tabular}
\end{table}

Several library databases which will be used have been 
identified, and can be found in Table~\ref{tab:library-databases}.

\end{document}

表格本身生成得很好,并按Table n应有的形式给出了一个增量数字。然而,在多次编译代码后,输出的 PDF 中却显示为 ??:

在此处输入图片描述

这看起来似乎是一件很基本的事情,但我无论如何也想不通为什么我不能简单地\ref创建表格。

奇怪的是,当我在环境中创建表格时,它工作正常figure,但我需要为此特定提交有一个表格列表,并且需要能够在环境中创建表格table,因为我的表格和图形需要分开。

如果有任何用处的话,我的 LaTeX 发行版是 MikTeX。

任何帮助都将受到赞赏。

相关内容