完整的报错信息为:
\label without proper reference.
See the caption package documentation for explanation.
这是在用VSCode写LaTeX代码的过程中,在图片中设置了\label
参数,在正文中用\ref
引用,渲染后发现无法正常引用,不会显示1.1
,只会显示??
。
这时出现的报错信息。
出现原因:把\label
写在\caption
前面了,把位置调换过来就行。
成功的示例代码:
\usepackage{graphicx}
...
\begin{figure}[bhp]
\centering
\includegraphics[width=\columnwidth]{figures/f.pdf}
\caption{Name of the Picture}
\label{fig:fig1}
\end{figure}