J*****n 发帖数: 48 | 1 我明明在figure里面用了\ref{fig:demo}了,引用的时候
总是说Reference `fig:demo' on page 16 undefined
这是怎么回事? |
s**********r 发帖数: 46 | 2 compile twice?
【在 J*****n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我明明在figure里面用了\ref{fig:demo}了,引用的时候 : 总是说Reference `fig:demo' on page 16 undefined : 这是怎么回事?
|
g**g 发帖数: 1575 | 3
\label{fig:demo}
【在 J*****n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我明明在figure里面用了\ref{fig:demo}了,引用的时候 : 总是说Reference `fig:demo' on page 16 undefined : 这是怎么回事?
|
p*****i 发帖数: 1183 | 4 figure里面用的应该是\label{fig:demo}
【在 J*****n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我明明在figure里面用了\ref{fig:demo}了,引用的时候 : 总是说Reference `fig:demo' on page 16 undefined : 这是怎么回事?
|
J*****n 发帖数: 48 | 5 I just figured out how this could happen but still don't know why:
previously I used
\begin{figure}\begin{center}...\end{center}\label{fig:demo}\end{figure}
which produced the wrong reference number,
then I changed to
\begin{figure}\centering ...\label{fig:demo}\end{figure}
now it produced the correct number. |
s***t 发帖数: 195 | 6 do you have a \caption in your figure env? it's \caption who produces
the label. figure or table by itself doesn't produce labels.
【在 J*****n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I just figured out how this could happen but still don't know why: : previously I used : \begin{figure}\begin{center}...\end{center}\label{fig:demo}\end{figure} : which produced the wrong reference number, : then I changed to : \begin{figure}\centering ...\label{fig:demo}\end{figure} : now it produced the correct number.
|
J*****n 发帖数: 48 | 7 sorry, its my typo.
I did use \label{fig:demo} in my figure and \ref{fig:demo} in text.
still not working.
【在 p*****i 的大作中提到】![](/moin_static193/solenoid/img/up.png) : figure里面用的应该是\label{fig:demo}
|
T*******n 发帖数: 493 | 8 \documentclass{article}
\begin{document}
See Figure \ref{fig:demo}.
\begin{figure}
\centering
\fbox{Demo}
\caption{Caption}
\label{fig:demo}
\end{figure}
\end{document}
【在 J*****n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : sorry, its my typo. : I did use \label{fig:demo} in my figure and \ref{fig:demo} in text. : still not working.
|