0

Using the scrartcl class I have an incorrect numbering of Figures as illustrated in the example below. How can this problem be corrected? A MWE is listed below.

Example of a PV system

The code used for the example is listed below.

\documentclass{scrartcl}

\usepackage{blindtext} \usepackage{graphicx}

\begin{document}

\section{Introduction} \blindtext[1]

\section{Special case}

Figure \ref{fig:PV} shows an example of a PV system installed on farmland.

\begin{figure} \centering \includegraphics[width= 0.6\textwidth]{pv.png} \label{fig:PV} \caption{Green energy.} \end{figure}

\end{document}

Image is from Pixabay.

Image by Sebastian Ganso from Pixabay

John
  • 647
  • 5
    This has nothing to do with scrartcl. The \label must come after \caption. – campa Feb 07 '22 at 16:07
  • 3
    As campa says the label need to refer to what is giving the number, which is not the env nor \includegraphics, the number comes from \caption and this \label needs to come after it. Otherwise the label points to the latest thing it can refer to in this case \section{Special case} which has the number 2. – daleif Feb 07 '22 at 16:12
  • Placing the \label after the \caption solves the problem. The suggested answer "Why does an environment's label have to appear after the caption?" is spot on, although, to find that post you must already now how to solve the problem! – John Feb 08 '22 at 08:06

0 Answers0