1

In the TOC, when I click on the chapters of the various parts, I end up on the chapter from previous part. So, when I click on Chapter 1 of Part 2, I'm taken to Chapter 1 of Part 1, simply because it's a Chapter 1. That the chapter 1 of Part 2 is located in Part 2 doesn't seem to be taken into account. So, when I click on Chapter 2 of Part 3, I'm taken to Chapter 2 of Part 1, and so on, like so:

  • Ch.1 of Pt.1 ----> Ch.1 of Pt.1
  • Ch.2 of Pt.1 ----> Ch.2 of Pt.1
  • Ch.1 of Pt.2 ----> Ch.1 of Pt.1
  • Ch.2 of Pt.2 ----> Ch.2 of Pt.1
  • Ch.3 of Pt.2 ----> Ch.3 of Pt.2
  • Ch.1 of Pt.3 ----> Ch.1 of Pt.1
  • Ch.2 of Pt.3 ----> Ch.2 of Pt.1
  • Ch.3 of Pt.3 ----> Ch.3 of Pt.2
  • Ch.4 of Pt.3 ----> Ch.4 of Pt.3

Thanks for looking into this.

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[oneside,centered,twocolumn]{book}
\usepackage[T1]{fontenc}
\special{papersize=215.9mm,279.4mm}
\usepackage[english]{babel}

\usepackage[sc]{mathpazo}
\linespread{1.05} % Palladio needs more leading

\usepackage{tocloft} % Customization of TOC LOF LOT

\makeatletter\@addtoreset{chapter}{part}\makeatother%

%\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage[toc,page]{appendix}
\usepackage{xcolor} % For links color
\usepackage{multirow}

\usepackage{epigraph}
\usepackage{caption} % To change way captions are labelled
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists

\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol
\usepackage{titlesec}

\usepackage{colortbl} % To define colors
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
\setsansfont{Cabin}

% QUOTE TEXT MARGINS + FONT SIZE %%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[font=small,rightmargin=0pt]{quoting}

% FOOTNOTES IN QUOTATION %%%%%%%%%%%%%%%%%%%%

\usepackage[symbol]{footmisc}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage[
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=teal,
urlcolor=teal
]{hyperref} % Hyperlinks

% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%

\newfontfamily\headingfont[]{Cabin}

\begin{document}

    % FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\frontmatter
{
    \hypersetup{linkcolor=blue}\textbf{}
    \renewcommand{\cftdot}{} % This line removes dots for Sections and under
    \tableofcontents
}
\clearpage

\addcontentsline{toc}{section}{\listtablename}
\small{\listoftables}
\clearpage

% MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\mainmatter

\part{Part One}

\chapter{Chapter 1 of Part 1}

\chapter{Chapter 2 of Part 1}

\part{Part Two}

\chapter{Chapter 1 of Part 2}

\chapter{Chapter 2 of Part 2}

\chapter{Chapter 3 of Part 2}

\part{Part Three}

\chapter{Chapter 1 of Part 3}

\chapter{Chapter 2 of Part 3}

\chapter{Chapter 3 of Part 3}

\chapter{Chapter 4 of Part 3}

\end{document}

1 Answer 1

1

This is now solved, thanks to a bit of code: \renewcommand*{\theHchapter}{\thepart.\thebook.\thechapter}

Found here: How can I reset sectional counters in memoir class to avoid breaking ToC cross-referencing in a complex document?

I changed it a little to adapt it to my book's structure, and the links now work -- line of code added right after the hyperref usepackage mention.

Here's the working code:

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[oneside,centered,twocolumn]{book}
\usepackage[T1]{fontenc}
\special{papersize=215.9mm,279.4mm}
\usepackage[english]{babel}

\usepackage[sc]{mathpazo}
\linespread{1.05} % Palladio needs more leading

\usepackage{tocloft} % Customization of TOC LOF LOT

\makeatletter\@addtoreset{chapter}{part}\makeatother%

%\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage[toc,page]{appendix}
\usepackage{xcolor} % For links color
\usepackage{multirow}

\usepackage{epigraph}
\usepackage{caption} % To change way captions are labelled
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists

\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol
\usepackage{titlesec}

\usepackage{colortbl} % To define colors
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
\setsansfont{Cabin}

% QUOTE TEXT MARGINS + FONT SIZE %%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[font=small,rightmargin=0pt]{quoting}

% FOOTNOTES IN QUOTATION %%%%%%%%%%%%%%%%%%%%

\usepackage[symbol]{footmisc}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage[
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=teal,
urlcolor=teal
]{hyperref} % Hyperlinks

\renewcommand*{\theHchapter}{\thepart.\thechapter}

% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%

\newfontfamily\headingfont[]{Cabin}

\begin{document}

    % FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \frontmatter
    {
        \hypersetup{linkcolor=blue}\textbf{}
        \renewcommand{\cftdot}{} % This line removes dots for Sections and under
        \tableofcontents
    }
    \clearpage

    \addcontentsline{toc}{section}{\listtablename}
    \small{\listoftables}
    \clearpage

    % MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \mainmatter

    \part{Part One}

    \chapter{Chapter 1 of Part 1}

    \chapter{Chapter 2 of Part 1}

    \part{Part Two}

    \chapter{Chapter 1 of Part 2}

    \chapter{Chapter 2 of Part 2}

    \chapter{Chapter 3 of Part 2}

    \part{Part Three}

    \chapter{Chapter 1 of Part 3}

    \chapter{Chapter 2 of Part 3}

    \chapter{Chapter 3 of Part 3}

    \chapter{Chapter 4 of Part 3}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .