2

I am writing my bachelor's thesis and I want for the first pages (title, table of contents, abstract) to be numbered with roman numbers, and the rest of the pages with arabic numbers. I have almost managed to do this, except the fact that my abstract page and table of contents page are numbered with the same number, i, and I get the following warning:

destination with the same identifier (name{page.i}) has been already used,    
duplicate ignored <to be read again>\relaxl.31 \newpage[1

I have read this page Hyperref and repeated page numbers and I have tried all these 3 options in the file mystyle.sty:

\usepackage[plainpages=false]{hyperref}
\usepackage[pdfpagelabels]{hyperref}
\usepackage[plainpages=false, pdfpagelabels]{hyperref}

But none of these help. Here is my document:

\documentclass[a4paper,10pt]{report}
\usepackage{mystyle}

\fancypagestyle{empty}{% \fancyhf{}% Clear header/footer \fancyhead[c]{Header} \fancyfoot[c]{Town, year}}

\renewcommand{\headrulewidth}{0pt} \setlength{\headheight}{35.0pt} \setlength{\parskip}{0.4cm} \setlength{\parindent}{0pt}

\title{Title} \author{Author}

\date{}

\begin{document} \pagenumbering{roman}

\maketitle

\newpage \input{abstract.tex} \newpage

\tableofcontents \newpage

\input{./tex/chapter1.tex} \pagenumbering{arabic}

\input{./tex/chapter2.tex} \input{./tex/chapter3.tex} \input{./tex/chapter4.tex} \input{./tex/chapter5.tex} \input{./tex/chapter6.tex}

\end{document}

This is my abstract.tex file:

\begin{abstract}
\thispagestyle{plain}
Abstract
\end{abstract}

And here is an example for one of the chapters file:

\chapter{Introduction}
\label{into}
Introduction

The mystyle.sty file:

\ProvidesPackage{mystyle}
\usepackage[utf8x]{inputenc}
\usepackage{hyperref}
\usepackage{fancyhdr}
David Carlisle
  • 757,742
Jessy09
  • 717
  • This looks like missing a \phantomsection statement. –  Feb 18 '14 at 09:32
  • There is some wrong anchor for bookmarks etc. inside from the \maketitle command. Omit it and try to make the title by hand. The message should vanish! –  Feb 18 '14 at 09:46
  • How can I make the title by hand? If I comment the \maketitle command I still get the warning – Jessy09 Feb 18 '14 at 09:54
  • Why do the tableofcontents and the abstract have the same number? Do you reset it? Why? To avoid the warning see http://tex.stackexchange.com/a/18927/2388 (including the comments) – Ulrike Fischer Feb 18 '14 at 10:01
  • 1
    Many details are missing. How do you write your abstract? Please, make a self contained example. – egreg Feb 18 '14 at 10:17
  • @Ulrike Fischer I dont' know why the page number is repeated because after every page I put a \newpage command. I have read the page you told me about and if I write the \hypersetup{pageanchor=false} command the warning disappears, but still nothing changes in the numbering; @egreg I have edited the question – Jessy09 Feb 18 '14 at 10:30
  • That's not a self contained example: We don't have your mystyle.sty. Beside this: abstract uses internally the titlepage option which resets the page number -- another reason to use a better class like scrrprt or memoir. You can also try the notitlepage option. – Ulrike Fischer Feb 18 '14 at 11:04
  • I have edited the question to include the mystyle.sty file. Using the notitlepage option is not a good choice because although the page numbering is good, I have no header or footer on the title page. Would it be better if I didn't have separate files? – Jessy09 Feb 18 '14 at 11:26

0 Answers0