0

The minimal working code =

\RequirePackage[2020-02-02]{latexrelease}
\documentclass{article}
%
\usepackage{graphicx}
\RequirePackage{hyperref}
%
\hypersetup{colorlinks=true,
    breaklinks=true,
    citecolor=black,
    urlcolor=blue,
    linkcolor=black,
    menucolor=blue,
    anchorcolor=red,
    pdfstartview={XYZ null null 1},
    bookmarksnumbered=false,
    bookmarksopen=true,
    bookmarksopenlevel=0}
%
\begin{document}
    For a full understanding of the air intake system relevant to the problem Figure \ref{fig:1.1} will be used as an example
    %
    \begin{figure}[ht]
        \centering
        \includegraphics[width=40mm,height=50mm]{system outline.PNG}
        \caption{simplified block diagram air intake system}
        \label{fig:1.1}
    \end{figure}
\end{document}

But then the result is like shown in the picture below: enter image description here

However i only want the numbers to be shown, if the phrasing of my question is wrong please excuse me for that.

Qrrbrbirlbel
  • 119,821
mopli
  • 1
  • Is there a specific reason you use \RequirePackage[2020-02-02]{latexrelease}? – samcarter_is_at_topanswers.xyz Dec 26 '22 at 13:23
  • by not using that in the minimal working example it indeed solves the problem however when i run my full file it shows the following error: Extra \endgroup. \begin{document} and a way to solve this is by using the older latex version. – mopli Dec 26 '22 at 13:50
  • rollback with latexrelease works as well as it can but can only provide short term fixes, there is absolutely no guarantee a format rolled back to 2020 will work with any packages updated in a 2022 texlive – David Carlisle Dec 26 '22 at 13:55

1 Answers1

0

Finally I have found the solution: Cross reference not working as intended, the entire name of reference and label gets printed? by Ulrike Fischer

You just need to add the following code:

\makeatletter
 \DeclareRobustCommand\ref{%
    \@ifstar\@refstar\T@ref
  }%
  \DeclareRobustCommand\pageref{%
    \@ifstar\@pagerefstar\T@pageref
  }%
 \makeatother

Full code:

\RequirePackage[2020-02-02]{latexrelease}
\documentclass{article}
%
\usepackage{graphicx}
\RequirePackage{hyperref}

\makeatletter \DeclareRobustCommand\ref{% @ifstar@refstar\T@ref }% \DeclareRobustCommand\pageref{% @ifstar@pagerefstar\T@pageref }% \makeatother

% \hypersetup{colorlinks=true, breaklinks=true, citecolor=black, urlcolor=blue, linkcolor=black, menucolor=blue, anchorcolor=red, pdfstartview={XYZ null null 1}, bookmarksnumbered=false, bookmarksopen=true, bookmarksopenlevel=0} % \begin{document} For a full understanding of the air intake system relevant to the problem Figure \ref{fig:1.1} will be used as an example % \begin{figure}[ht] \centering \includegraphics[width=40mm,height=50mm]{system outline.PNG} \caption{simplified block diagram air intake system} \label{fig:1.1} \end{figure} \end{document}

mala97
  • 312