GeneralProblems with command \ref

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
worksofart
Posts: 2
Joined: Mon Mar 17, 2008 7:38 pm

Problems with command \ref

Post by worksofart »

Dear all,
I had a problem with the references of tables and figures. When I compile the PDF, when I refer to a table (for example), it write me the enumeration of the section or the subsection where the table is, in spite of the one of the table.
Do you have any suggestions??
I don't create any label of the section and the subsection and I don't have this problem with equations.

Please, I am really in trouble.
thanks
Luke

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
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Problems with command \ref

Post by Juanjo »

Have you written the corresponding \label command before \caption? If this were the case, this may be the cause of the problem. Write something like this:

Code: Select all

\begin{figure}
    (some stuff here: \centering, \includegraphics...)
   \caption{Text of the caption}\label{text}
\end{figure}
Same thing with the table environment.
worksofart
Posts: 2
Joined: Mon Mar 17, 2008 7:38 pm

Re: Problems with command \ref

Post by worksofart »

Juanjo, you are a master!!!

It was (obviously) my fault ;)...I used \label before \caption..
thanks for your prompt answer
Post Reply