i'm using the {fei} class im my document and my preamble is pretty simple as follows


when using the \ref{} command to call an equation as in the example below, the resut is pretty much the expected:

\nu_{max} \propto T \Leftrightarrow \nu_{max}=Constante_{2}.T
onde, para um corpo negro, a equação (\ref{eq3})

Result from the code above

But when using the exact same command to call in a figure i get an error, the code go as following:


And thats the result when i  use for figures

Any equation that i reference works perfectly fine, but every single figure i try use the same method shows this error, i read that compiling 2 or more times might be able to fix the issue, but i tried several times and it persists.

i'm pretty sure it must be something really simple and easy to fix, but cant find what no matter how much i try....

  • 1
    You need to reference a caption. A figure environment without \caption doesn't generate a number LaTeX can refer to. By the way you should use \centering rather than \center.
    – egreg
    Commented Dec 24, 2017 at 20:33
  • 1
    Also you should load siunitx and input the value of the constant as \SI{2,898e-3}{\meter\kelvin}
    – egreg
    Commented Dec 24, 2017 at 20:36
  • Ohh my, i have no ideia how i didn't realize it sooner, i knew it was something simple right under my nose. Thank you very much for your help @egreg, and sorry to take your time with such a silly question i'm really grateful Commented Dec 24, 2017 at 20:38
  • Also you should load siunitx and input the value of the constant as \SI{2,898e-3}{\meter\kelvin} <br/> i didn't even know that was even a thing, going to try right away Commented Dec 24, 2017 at 20:40
  • It looks so much better now, i can't thank you enough, my thessi will look much prettier with your tips Commented Dec 24, 2017 at 20:47

1 Answer 1


You can use \label after LaTeX has generated a number; a figure environment, by itself, doesn't generate a number: it's \caption that does.




\nu_{\mathrm{max}} \propto T \Leftrightarrow \nu_{\mathrm{max}}=
\mathrm{Constante}_{2}\cdot T
onde, para um corpo negro, a equação~(\ref{eq:nu-max})
vale \SI{2,898e-3}{\meter\kelvin}.



\caption{Esta é uma legenda}


O gráfico (A) de figura~\ref{fig:example} mostra a distribuição de Boltzmann.


Now the reference can work.

enter image description here

Some other points. The (low) period is never used to denote multiplication. Textual inserts in a math formula should be upright. For the constant and in other similar instances, it's best to use siunitx that guarantees uniform appearance across the document (for instance, the symbol for kelvin is an uppercase K). If you prefer to have explicit multiplication symbols between units, change the \sisetup command in the preamble into


and the output would become

enter image description here

with no change in the document code.

Use a tie between the word “equação” as well as “figura” and the reference number.

It's incorrect to use \center; rather use \centering or nothing at all, as the class sets left aligned captions, so probably left aligned images are better suited.

  • Utterly perfect, thank you sensei. Sorry for the huge ammount of mistakes, i began using latex just a few days ago Commented Dec 24, 2017 at 20:56
  • @LucasSalgueiro Don't worry: being a novice you're supposed not to know how to use the program. ;-) Glad to be helpful.
    – egreg
    Commented Dec 24, 2017 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .