# Hyperref links generated by Glossaries pointing to wrong page

In a long document I have two title pages and want to start the page numbering from one on the first non-title page. Thus I use \addtocounter{page}{-2} at the begin of the document. Pages before the first chapter is numbered in Roman, from there on in arabic.

Now I started to use the glossaries-package. I found that the page links in the glossary are pointing to the total page numbers in the pdf.

So if the first \gls{label} is on page 2 in the arabic numbered section, the link behind the glossary entry points to the second title page. All other links generated by hyperref are good.

In a different posting I learned, that it is because of the hypertexnames=false option of hyperref. If I replace it as supposed in the other post, all the links to floats are broken.

How can I fix this problem? Or if not, how can I hide those page numbers? Did not find it in the manual of the package...

Example with broken links: (comment the line hypertexnames=true, and replace it by the two lines above to get the glossaries links working but loose the links to floats)

 % 1. latex minimalgls
% 2. makeglossaries minimalgls (note no extension)
% 3. pdflatex minimalgls
\documentclass[ngerman]{article}
\listfiles
\usepackage[utf8]{inputenc}
\usepackage[ps2pdf,
bookmarks=true,%                   %%% generate bookmarks ...
bookmarksnumbered=true,%           %%% ... with numbers
%
%plainpages=false,
%pdfpagelabels,
hypertexnames=true,%              %%% needed for correct links to figures !!!
%
%breaklinks=true,%                  %%% breaks lines, but links are very small
%linkbordercolor={0 0 0},%          %%% blue frames around links
pdfborder={0 0 0}]{hyperref}
\usepackage[hyperfirst=false]{glossaries} % acronym will go in main glossary
%\usepackage[acronym]{glossaries} % make a separate list of acronyms

\makeglossaries

\newglossaryentry{sample}{name={sample},
description={a sample entry}}

\newacronym[\glsshortpluralkey=cas,\glslongpluralkey=contrived
acronyms]{aca}{aca}{a contrived acronym}

\begin{document}
\pagenumbering{fnsymbol}
Title One
\clearpage
Title Two
\clearpage
\pagenumbering{Roman}
\printglossaries
\clearpage
\pagenumbering{arabic}

A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}.
\clearpage
Plurals: \glspl{sample}. Reset acronym\glsreset{aca}.
First use: \glspl{aca}. Second use: \glspl{aca}.

\end{document}

-

You could try this (if I understood your question):

\pagenumbering{Alph}
\begin{document}
<your title pages here>
\pagenumbering{Roman}% as replacement for \addtocounter{page}{-2}
<...>
\pagenumbering{arabic}% for the first chapter as already done


If you are using Alph page "numbers" later in the document, use alph or roman or fnsymbol for the title pages.

-
Great tip. But it did not solve the problem. The links still point to the wrong pages. –  Simon Nov 23 '11 at 15:06
@Simon: Do you need the ps2pdf option with hyperref? I removed that option, copied the code to test.tex and compiled pdflatex test.tex, makeglossaries test, pdflatex test.tex, and the links pointed at the glossary-entries. Could that be a possibility for you? –  Stephen Nov 23 '11 at 19:12