I am creating a user manual for an ERP software and I am using \hyperlink{}{}
option to create the links. After clicking on the link, it is pointing to the first page always. I tried the solution given in the link Hyperref \pageref links point to first page . But the given solution is not working for me.
The code is:
\documentclass[a4paper, 12pt]{article}
\usepackage[top=1.65cm, bottom=2cm, right=1.25cm, left=1.25cm]{geometry}
\usepackage{subfiles}
\usepackage{tcolorbox}
\usepackage{hyperref}
\newcommand{\hlabel}{\phantomsection\label}
\hypersetup{hidelinks}
For defining labels I tried both:
\section{Module}
\phantomsection\label{sec:st}
and
\section{Module}
\label{sec:st}
What should I do to correct this issue?
Thanks in advance.
\hyperlink
and\hypertarget
use the same name. The hypertarget name for\label
is generated by\refstepcounter
. You can find out what it is using\csname @currentHref\endcsname
or look it up in the aux file.