I want to have the reference number of the figure referring to the figure number (1) and not the subsection number (1.1). What shall I do?

Here is the output:

enter image description here

Here is the code:

\documentclass[a4paper, 10pt]{article}
\definecolor{myblue}{RGB}{0, 32, 255}
\author{\small Name of author}
\section{section 1}
\subsection{subsection 1}%\label{Complexity_of_MR}
(figure reference
%    \includegraphics[width=0.48\textwidth]{figures/MR_mechanisms_01.png}

  • 3
    You should put \label inside the figure environment, just after \caption.
    – Bernard
    May 24, 2022 at 8:34
  • yes thank you @Bernard!
    – ecjb
    May 24, 2022 at 8:35
  • 1
    And don't use center to center the figure, replace \begin{center} by \centering and remove \end{center}. The center env adds aspace above and below, as does figure. BTW: you generally shoulkd not use [H] placement.
    – daleif
    May 24, 2022 at 8:51
  • Thank you for your comment @daleif. I removed the \begin{center}. I use the [H] placement so that the figure is positioned exactly where I want inside the text (and does not randomly get moved without [H]). Could you maybe give me then a good alternative for this?
    – ecjb
    May 24, 2022 at 9:37
  • 1
    [H] is a bad idea, it leaves a big gab if the figure does not fit at this exact place. And you do not what the figure right here, you want it here about. Lear ro use the [htbp] placement, and never refer to a figure as below/above, etc always refer to the figure number.
    – daleif
    May 24, 2022 at 9:52


You must log in to answer this question.

Browse other questions tagged .