1

My code:

\documentclass[
               titlepage,
               abstract
              ]{scrartcl}

\usepackage[texindy]{imakeidx}
\usepackage{hyperref}

\makeindex[intoc]

\title{Test}
\dedication{Test.}

\begin{document}

  \maketitle
  \begin{abstract}
    Test.
  \end{abstract}

  \pagenumbering{Roman}
  \tableofcontents
  \newpage
  \pagenumbering{arabic}

  \section{Test}
    Das Zweistrom-Turbinen-Luftstrahltriebwerk (ZTL)\index{ZTL}~\ldots

  \newpage
  \pagenumbering{Roman}
  \setcounter{page}{2}
  \printindex

\end{document}

The table of contents should start with big Roman one. The text part (in the MWE starts with the test section) should start with an arabic one. This works.

But if I click in the index on the link, then it jumps to the title page (physical page one). I don't know what I'm doing wrong, but if I comment out the lines, which have to do with the page numbering (twice \pagenumbering{Roman}, \pagenumbering{arabic} and \setcounter{page}{2}), than it have the expected behavior. At the same time the hyperlinks in the table of contents work every time.

Why is it so and how can I fix this?

Thank you for your help and effort in advance!

Su-47
  • 2,508

2 Answers2

2

You get

pdfTeX warning (ext4): destination with the same identifier (name{page.1})
has been already used, duplicate ignored

and the problem is that the title page shares number 1 with the one where \section{Test} appears.

Add \pagenumbering{Alph} for the front matter pages. Also it's cleaner to use \clearpage rather than \newpage before changing the page numbering style.

\documentclass[
  titlepage,
  abstract
]{scrartcl}

\usepackage[texindy]{imakeidx}
\usepackage{hyperref}

\makeindex[intoc]

\title{Test}
\dedication{Test.}

\begin{document}

\pagenumbering{Alph}

\maketitle
\begin{abstract}
Test.
\end{abstract}

\clearpage
\pagenumbering{Roman}

\tableofcontents

\clearpage
\pagenumbering{arabic}

\section{Test}

Das Zweistrom-Turbinen-Luftstrahltriebwerk (ZTL)\index{ZTL}~\ldots

\clearpage
\pagenumbering{Roman}
\setcounter{page}{2}

\printindex

\end{document}
egreg
  • 1,121,712
0

Try like that, just with \pagenumbering{Roman} \pagenumbering{arabic} just after packages

\documentclass[
               titlepage,
               abstract
              ]{scrartcl}

\usepackage[texindy]{imakeidx}
\usepackage{hyperref}
  \pagenumbering{Roman}
 \pagenumbering{arabic}
\makeindex[intoc]

\title{Test}
\dedication{Test.}

\begin{document}

  \maketitle
  \begin{abstract}
    Test.
  \end{abstract}


  \tableofcontents
  \newpage


  \section{Test}
    Das Zweistrom-Turbinen-Luftstrahltriebwerk (ZTL)\index{ZTL}~\ldots

  \newpage
  \pagenumbering{Roman}
  \setcounter{page}{2}
  \printindex

\end{document}

Jeremy

Stefan Pinnow
  • 29,535
  • Hello @Jérémy Spark Fraissenet! Thank for your answer! The table of contents should have Roman page numbering too. Your suggestion didn't unaccounted for it. – Su-47 Jun 29 '18 at 08:32