Graphics, Figures & Tables\label{...} and \ref{...} creating reference problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
activematt
Posts: 5
Joined: Sun Mar 27, 2011 9:28 am

\label{...} and \ref{...} creating reference problem

Post by activematt »

Hi im unable to figure out why some of my figure refrences are not showing up when i use the \ref equation, also some numbers in my TOC are missing. Here is how i call a picture. In place of the reference number i see '??'

Code: Select all

  
\begin{figure}[htbp]
    \centering
    \includegraphics[width=6in,height=3.5in]{ip_res_disp.png}
    \caption{In-Phase Decaying Transient Response}\label{fig:In-Phase Decaying Transient Response}
    \addcontentsline{toc}{subsubsection}{\figurename\ \ref{fig:ip_res_disp}: In-Phase Decaying Transient Response}
 \end{figure}
I am compiling using pdflatex, and have tried recompiling? Thanks for the help
Last edited by activematt on Tue Mar 29, 2011 9:15 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

\label{...} and \ref{...} creating reference problem

Post by localghost »

Compare the arguments of \label{…} and \ref{…} in your code snippet and you have the solution.


Thorsten
Post Reply