0

Below I write a minimal working example of a document in which one passes from roman numbering (in TOC) to arabic numbering in the "body" of the document.

Note that I use imakeidx package so as to have an index of names/concepts at the end of the document itself.
However, some unexpected error occurs. In fact, with the code below as an input:

\documentclass[12pt,oneside,english]{report} 

\usepackage[a4paper]{geometry}
\geometry{verbose, tmargin=2cm, bmargin=2cm, lmargin=2cm, rmargin=2cm, headsep=0.5cm, footskip=1cm}
\usepackage{imakeidx}
\makeindex[columns=3, options = -s Analyticalindexsetting.mst]
\usepackage[hidelinks]{hyperref}

\begin{document}
\frontmatter
\phantomsection
\linespread{1} 
\thispagestyle{empty}
\large
\begin{center}
   \Large{{\underline{\textsc{University XXXXX}}}}
\end{center}
\vspace{0.1cm}   
\begin{center}   
   \Large{{\textit{DEPARTMENT OF XXXXXX}}}
   \vspace{1.5cm}\\
   \normalsize{\textit{\textbf{MsC Degree}}}\\ \normalsize{\textbf{\\In}}\\ \normalsize{\textbf{\\XXXXX}}   
\end{center}
\vspace{1cm}
\begin{center}
  {\LARGE \textbf{YYYYYYYY} \smallskip\\}                                               
\end{center}
\vspace{3cm}
   \begin{tabular}{ll}
            \textit{DEFENDED BY}      \hspace{5cm}     & \textit{SUPERVISOR}  
            \vspace{0.6cm}   &   JJJJJJJJ\hspace{3cm} & Prof. OOOOO \\
                                
   \end{tabular}

\clearpage 
\begingroup
  \pagestyle{empty}
  \null
  \newpage
\endgroup
\pagenumbering{roman}
\pagestyle{plain}

\phantomsection
\tableofcontents

\chapter{FFFFFFFFFFFFFFFFF}\label{chap: Brownian motion theory}
\justify 
\pagenumbering{arabic}
\lhead{\textbf{\rightmark}}
\section{WWWWWW}\label{subsec: History of Brownian motion}
\justify 
\noindent As pointed out in Hist\index{Hist}...

\printindex
\backmatter

\end{document}

I get an output which comprise five pages:

  • thesis title (not numbered);
  • blank page (not numbered);
  • TOC (numbered by i);
  • body (numbered by 1), in which the word "Hist" appears;
  • index of names/concepts (numbered by 2).

The last page (i.e. "index of names/concepts" page) appears as follows:

enter image description here

But if I click on number 1 next to "Hist", link leads me to "thesis title" page (which is actually not numbered) and not to the page in which the word "Hist" actually is, namely "body" page (which actually is the one numbered by 1).

I think that the problem is that "thesis title" page is authomatically "recognized" as the first page in the document, hence number 1 in the index authomatically refers to that page and not to the page which is actually numbered by 1 (i.e. "body" page).



As far as you know, how could it be possible to fix such a problem so as that the link leads exactly to the page which is actually numbered by 1 (that is, "body" page in my above example)?

4
  • 1
    the titlepage is numbered, you only don't see the number. And as the number is 1 this confuses the links. Use e.g. \pagenumbering{Roman} for the title page, or surround the title pages with the NoHyper environment, that should work too. – Ulrike Fischer Oct 30 '20 at 14:25
  • How exactly could I surround the title pages with the NoHyper environment? Simply by \begin{NoHyper} [...] \end{NoHyper}? @UlrikeFischer – Strictly_increasing Oct 30 '20 at 14:29
  • 1
    well write \begin{NoHyper} before and \end{NoHyper} after the pages (the environment suppress the links and destinations). – Ulrike Fischer Oct 30 '20 at 14:34
  • It works well, thanks! @UlrikeFischer – Strictly_increasing Oct 30 '20 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.