[Tex/LaTex] Glossary backlink points to wrong page

glossarieshyperrefpage-numbering

The gloassary I am displaying keeps a backlink to the page, where the entry was used. It correctly says page 3, but the link jumpgs to the 3rd page from the beginning, instead to the 3rd page with arabic pagenumbering. What am I missing here?

To reproduce: 1. Build this thing 2. Go to glossary and click the pagenumber 3. Find yourself looking at the 3rd page.

    \documentclass[10pt,a4paper,headsepline,footsepline,DIV13,BCOR12mm]{scrbook}
    \usepackage[english,ngerman]{babel}
    \usepackage[T1]{fontenc}
    \usepackage[latin1]{inputenc}
    \usepackage{scrpage2}
    \pagestyle{scrheadings}
    \usepackage{graphicx}
    \usepackage{hyperref}
    \usepackage[toc,numberedsection]{glossaries}
    \makeglossaries
    \newacronym{fap}{FAP}{Fundamental Architectural Principles}

    \begin{document}

    \selectlanguage{ngerman}
    \thispagestyle{empty}

    \begin{table}[h]
    \centering
    \begin{tabular}{ccc}
    \hspace{0.7cm} &
    \end{tabular}
    \end{table}

    \vspace{8mm}
    \begin{center}
    {\Large
    {\bfseries \scshape Institut Software \&  Engineering}\\
     6a \hspace{0.25cm} D- \\
    }
    \end{center}

    \vspace{1cm}
    %title
    \begin{center}
    {\Huge \bfseries asd  \\[2mm] in   \\[5mm] asdasd }
    \end{center}

    \vspace{1.5cm}
    %author
    \begin{center}
    {\Large Christian Vaas}
    \end{center}

    \vspace{1cm}
    \begin{center}
    {\Large \bfseries Masterarbeit  Software Engineering}
    \end{center}

    \vspace{1cm}
    \begin{center}
    \includegraphics[width=.4\linewidth]{img/logos/LogoSEengl}
    \end{center}

    \newpage
    \thispagestyle{empty}
    \mbox{}
    \newpage
    \thispagestyle{empty}

    \begin{table}[h]
    \centering
    \begin{tabular}{ccc}
    \hspace{0.7cm} &
    \end{tabular}
    \end{table}

    \vspace{1cm}
    \begin{center}
    {\Large
    {\bfseries \scshape Institut Software \& Systems Engineering}\\
     6a \hspace{0.25cm} D- \\
    }
    \end{center}

    \vspace{2.5cm}
    %title
    \begin{center}
    {\Huge \bfseries  Patterns \\[2mm] in   \\[5mm]  Architectures}
    \end{center}

    \vspace{1cm}
    %author
    \begin{center}
    \begin{table}[h]
    \centering
    \begin{tabular}{ll}
    Matrikelnummer: &  \\
    Beginn der Arbeit: & XX.\ X. XXX 20XX \\ 
    Abgabe der Arbeit: & XX.\ X. XXX 20XX \\
    Erstgutachter: & Prof.\ Dr.\   \\
    Zweitgutachter: & Prof.\ Dr.\ YYY YYYYYY \\
    Betreuer: &  S.  \\
    \end{tabular}
    \end{table}
    \end{center}

    \vspace{1.25cm}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% Statement-Page
    \newpage
    \thispagestyle{empty}
    \mbox{}
    \newpage
    \thispagestyle{empty}

    \centerline{\bfseries ERKLAERUNG}

    \vspace{5cm}
    Hiermit versichere ich, dass ich diese Masterarbeit selbstaendig verfasst habe.
    Ich habe dazu keine anderen als die angegebenen Quellen und Hilfsmittel
    verwendet.

    \vspace{1cm}
    \begin{flushleft}
    %select german for formatting the date
    \selectlanguage{ngerman}
    Augsburg, den \today \hfill ZZZ ZZZZZZ
    \end{flushleft}

    \newpage
    \thispagestyle{empty}
    \mbox{}


    \newpage

    %select english as language!
    \selectlanguage{english}

    \vspace*{1cm}
    \section*{\centering Abstract}
    \vspace{1cm}

    \paragraph*{CONTEXT}

    \pagenumbering{roman}

    \tableofcontents
    \newpage
    \listoffigures
    \newpage
    \listoftables

    \pagenumbering{arabic}

    \chapter{Introduction}
    \section{Motivation/Challenges}
    \section{Approach}
    Blubber \gls{fap}

    \printglossaries

    \end{document}

Best Answer

The problem stems from the way you number your pages: while you suppress the page numbers on your title pages with \thispagestyle{empty}, those pages are still numbered internally with arabic numbers. So move the \pagenumbering{roman} right after \begin{document}. This will shift the roman numbers, e.g., the ToC will now be on page ix, as it should be.

Related Question