## LaTeX forum ⇒ Theses, Books, Title pages ⇒ legrand-orange-book /label Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
siemj
Posts: 2
Joined: Thu Jan 04, 2018 3:38 pm

### legrand-orange-book /label

The Legrand Orange Book template is an excellent template, but after one hour of fiddling with it, I came acrosse a problem.

it looks like when the following code is written in a chapter, the reference sticks to 1.1.
\begin{figure}[h]\label{fig:figure}\centering\includegraphics[scale=0.5]{afigure}\end{figure} \begin{figure}[h]\label{fig:figure2}\centering\includegraphics[scale=0.5]{anotherfigure}\end{figure} As you can see in figure \ref{fig:figure} and figure \ref{fig:figure2}.

The output is:

picture

picture

As you can see in figure 1.1 and figure 1.1.

This is not the case with footnotes for example. Referencing footnotes always succeeds.

Tags:

siemj
Posts: 2
Joined: Thu Jan 04, 2018 3:38 pm
I suck.
Writing a label after the caption inside the figure-element solves the issue.

Stefan Kottwitz
Posts: 9456
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

Yes, that's correct: the \caption command increases the figure number and places an anchor for referencing via label. So the \caption command has always to come before the \label.

Stefan