5

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}
  • 2
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Your given code has \input macros so we can' t reproduce your problem. You can use package blindtext to generate an example text ... – Mensch Jun 17 '13 at 12:14
  • That kinda complicated ... I know that the titlepage causes the error, but it is predefined by my university. Should I paste the contents of the titlepage? – Coxa Jun 17 '13 at 12:44
  • Works for me. Make sure your .sym and .gls files are up-to-date by rerunning makeindex. If this does not help, please update your MWE so we can reproduce the behaviour. – mafp Jun 17 '13 at 16:20
7

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.

  • That worked out perfect :) Thank you very much! I have still one problem left with the page numbering, but I think this has to go to a new question. Reference: tex.stackexchange.com/questions/119731/… – Coxa Jun 18 '13 at 12:11
4

The problem isn't related to glossaries but is because you have multiple PDF anchors with the same identifiers. I suspect you have a message in your log file along the lines of:

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

Each page in the PDF file is given an anchor in the form "page.n" where n is the page number, so page 3 has the anchor page.3 and page iii has the anchor page.iii, but you have two pages numbered 3 (in arabic): one is in the titling area, the other is in the main matter. You can't see the page number in the first instance because you've suppressed its appearance with the empty page style, but even though you can't see it, there is still a number associated with that page.

Here's an example:

\documentclass{scrbook}

\usepackage{hyperref}

\begin{document}

\begin{titlepage}
Insert title page text here.
\end{titlepage}

\cleardoublepage

\begin{titlepage}
Insert institute blurb here.
This is page 3. It has an anchor called ``page.3''.
\end{titlepage}

\cleardoublepage

\begin{titlepage}
Insert statement blurb here.
\end{titlepage}

\frontmatter

page i
\clearpage

page ii
\clearpage

page iii
\clearpage

\mainmatter

page 1

\clearpage

page 2
\clearpage

page 3.
This is also page 3. It has been given a duplicate anchor called ``page.3''.

\clearpage

\hyperlink{page.3}{Page 3}

\end{document}

Since duplicate anchors are ignored, the hyperlink goes to the first defined anchor. One way to get around this is to use a different page numbering for the title pages. Since the page style is empty, you can choose any style you like, as long as it isn't used anywhere else in the document. For example:

\documentclass{scrbook}

\usepackage{hyperref}

\begin{document}

\pagenumbering{alph}
\begin{titlepage}
Insert title page text here.
\end{titlepage}

\cleardoublepage

\begin{titlepage}
Insert institute blurb here. This page has the anchor ``page.c'', but you 
can't see the number as the page style is empty.
\end{titlepage}

\cleardoublepage

\begin{titlepage}
Insert statement blurb here.
\end{titlepage}

\frontmatter

page i
\clearpage

page ii
\clearpage

page iii
\clearpage

\mainmatter

page 1

\clearpage

page 2
\clearpage

page 3

\clearpage

\hyperlink{page.3}{Page 3}

\end{document}

The hyperlink now links to the correct page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.