TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok so I'm trying to reference a couple of images from my document. The code is:

\caption{Aceleramiento con las 4 primeras imágenes}

\caption{Aceleramiento real del método}

In the text I'm referencing the images like this


But all I get is this ??. I tried putting the label after the caption and even inside the caption. I also tried recompiling the document several times with the Gummi compile option and even cleaning up build files before compiling but it doesn't work. The strange thing is that I'm referencing some tables before and they are working but not my figures. Any idea why?

share|improve this question
Use \ref{grafico1}; the string used in the argument of \ref has to be the exact string used in \label, so if you say \label{grafico1} you have to use \ref{grafico1}. – Gonzalo Medina Jul 12 '13 at 1:23
Off course this has nothing to do with the editor ! How can we convince users to try to compile on the command line to discriminate between a latex wrong coding like here and an editor problem? – Jhor Jul 12 '13 at 8:58
@Jhor: you don’t. if i want my wife to self-help on her widnoze machine using a command line, she simply can’t ... and she's quite a sophisticated user of windows. i would say there's essentially no chance of getting other “ordinary” users to drop down to the command line, so we need to find a way of wording answers in that context (says he, who almost never writes answers since every answerer here is cleverer than me...). – wasteofspace Jul 12 '13 at 10:46
@wasteofspace: I tiotaly agree. My (former) wife is clearly like yours... – Jhor Jul 12 '13 at 16:56
up vote 4 down vote accepted

You need to use \ref{grafico1}; the string used in the argument of \ref has to be the exact same string used in \label, so if you say \label{grafico1} you have to use \ref{grafico1}. Process the document twice to get the cross-reference number.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.