I am using package hyperref. When I click at Chapter one of part two in PDF file, I jump to Chapter one of part one. How can I jump to Chapter one of part two?
My code
\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\part{Part One}
\chapter{Chapter one}
\section{Section one}
\section{Section two}
\chapter{Chapter two}
\section{Section three}
\section{Section four}
\part{Part One}
\setcounter{chapter}0
\chapter{Chapter one}
\section{Section one}
\section{Section two}
\chapter{Chapter two}
\section{Section three}
\section{Section four}
\end{document}

\makeatletter \@addtoreset{chapter}{part} \makeatotherto the preamble instead of using\setcounter{chapter}0as described in the answer to How to reset chapter and section counter with \part should also work in your example: Alternatively,\counterwithin*{chapter}{part}should also do the trick. – leandriis Nov 06 '21 at 11:41