10

I try to use hyperref with pagebackref to get a page number and a link for each of my references. My first pages have roman numbers (title page, ...), later on I switch to arabic numbers. For whatever reason the links in the references have the right page number but the link is wrong (somehow a negative offset).

I have a minimal example:

\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage[left=4cm,top=3cm,right=3cm,bottom=4cm]{geometry}
\usepackage[pdftex, plainpages=false, hypertexnames=false, pdfpagelabels=true,
    hyperindex=true, linktocpage, pagebackref=true, pdfa=true]{hyperref}

\begin{document}
\pagenumbering{roman}
\pagestyle{empty}
Titel

\setcounter{page}{1}
\tableofcontents
\newpage

\pagenumbering{arabic}
\pagestyle{plain} 
\chapter{one}
\section{one}
\newpage

\section{two}
Zitation~\cite{citation_key}

\bibliographystyle{plain}
\begin{thebibliography}{widest-label}
    \bibitem{citation_key}Autor: Titel. Verlag, Jahr.
\end{thebibliography}
  \end{document}

Any ideas?

Tobias
  • 211
  • 1
    You have two pages numbered i; better say \pagenumbering{alph} for the title page and \pagenumbering{roman} in place of \setcounter{page}{1}. Remember to always leave an empty line after a bibliography entry. – egreg Jun 07 '12 at 20:56

2 Answers2

11

I got a solution.

the hyperref option hypertexnames must be set to true (the default value).

In the first place this caused other problems with my template

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

I could solve this problems using \Roman pagenumbering for the title page and similar, \roman pagenumbering for table of content and similar and \arabic pagenumbering for the rest of the document.

Tobias

moewe
  • 175,683
Tobias
  • 211
  • 3
    Many thanks Tobias, your little answer saved me where dozens of others failed. \hypersetup{hypertexnames=true} does the trick! – RobinLovelace Sep 02 '13 at 17:51
1

If you do not want backref returns you to the wrong page in the text, it should not have identical numbering systems. Thus since the beginning of document until the beginning of the use of Arabic numerals, you must use Roman numerals.

%%%%%%%%%%%%%%%%%%%%%% Debut du doccument %%%%%%

\begin{document}
\thispagestyle{empty} \pagenumbering{roman}
%%%%%%%%%%%%%%%%%%%%% page couverture %%%%%%%%%%%%

\includepdf[pages=-, width=8in]{cover_page}
%\includepdf[pages=1,2,3,4 width=5in]{portada.pdf}
\setsecnumdepth{subsection}

%%%%%%%%%%%%%%%%%%%%%% Title page titre %%%%%%

\mainmatter

%%%%%%%%%%%%%%%%%%%%%%%%%% Corps du texte %%%%%%

\pagenumbering{arabic}

\include{your file}
\include{your file}
\include{your file}

%%%% Apendices et Bibliogaphie %%%%%%
\backmatter
\end{document}
  • 1
    Can you please explain how you solve the problem? Only the code may not be understandable for everyone. BTW: Welcome to TeX.SE! – Mensch May 07 '15 at 16:05