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}
\phantomsectionstatement. – Feb 18 '14 at 09:32\maketitlecommand. Omit it and try to make the title by hand. The message should vanish! – Feb 18 '14 at 09:46\maketitlecommand I still get the warning – Jessy09 Feb 18 '14 at 09:54\newpagecommand. 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:30notitlepageoption. – Ulrike Fischer Feb 18 '14 at 11:04mystyle.styfile. Using thenotitlepageoption 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