Graphics, Figures & Tablesreferencencing figures and tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jcmt_pico
Posts: 19
Joined: Fri Jun 18, 2010 12:39 am

referencencing figures and tables

Post by jcmt_pico »

When trying to reference (\ref{}) a figure or table, question marks appear where the reference should. I already tried compiling twice but nothing seems to work. Here is an example of one of the figures and the referencing which aren't working. Thank you!

Code: Select all

[size=85]\begin{figure}[h]
\label{eta}
\centering
\includegraphics[height=5cm]{./campo_temp_media/diff.eps}
\caption{Diferença de temperatura média à superfície SRESA2 e 20C3M ($^\circ C$)}
\end{figure}
%
\noindent No campo da figura \ref{eta} os valores [/size]
Last edited by jcmt_pico on Fri Aug 27, 2010 8:16 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

referencencing figures and tables

Post by localghost »

In your figure environment set the \label after the \caption command.

Code: Select all

\begin{figure}[!ht]
  \centering
  \includegraphics[height=5cm]{./campo_temp_media/diff}
  \caption{Diferença de temperatura média à superfície SRESA2 e 20C3M ($^\circ C$)}
  \label{fig:eta}
\end{figure}

Thorsten
Post Reply