8

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}
2
  • Your MWE (without the ps2pdf hyperref option) works correctly for me (both with pdflatex and with latex+dvips+ps2pdf). What version of glossaries and hyperref do you have installed? Sep 3, 2014 at 18:46
  • The answer here solved the problem for me.
    – Albert
    Jul 6, 2020 at 22:33

1 Answer 1

3

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.

2
  • 1
    Great tip. But it did not solve the problem. The links still point to the wrong pages.
    – Simon
    Nov 23, 2011 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, 2011 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .