# Wrong referencing for glossary/acronyms when on same page [closed]

I just recently noticed that when I have glossaries and acronyms on the same page the referencing isn't working correctly, meaning: when clicking on a reference, it jumps to the wrong place.

\documentclass[a4paper]{scrartcl}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{nameref}
\usepackage[nonumberlist,acronym,toc,section]{glossaries} % must be the last package to include

% Glossary
\makeglossaries
\newglossaryentry{test}{name=Test,
description={This is a test entry},

% Acronyms
\newacronym{TIAT}{TIAT}{this is a test}
\newacronym{TIAST}{TIAST}{this is a second test}

\begin{document}
\tableofcontents
\section{Section 1}
This is a \gls{test}.
\section{Section 2}
\gls{TIAT}.
\gls{TIAST}.

\printglossary[style=altlist,title=Glossary]
\printglossary[type=\acronymtype,style=long]
\end{document}


The problem can be fixed, when inserting a \pagebreak between the two printglossary[params]. However, I was wondering, why it does that? Will that happen to sections as well, if they didn't implicit a pagebreak?

The code above has to be compiled as follows (IIRC):

pdflatex file.tex
makeglossaries file
pdflatex file.tex
pdflatex file.tex

-
 Add \phantomsection before the first \printglossary. – egreg Jun 15 '12 at 23:27 @egreg I guess my document is special again. I really can't tell at which part it doesn't work, because it's already too big to really pinpoint the problem... the phantomsection works for the MWE though... I guess I have to live with the pagebreak. – cherrung Jun 15 '12 at 23:39 @cherrung: I don't have any trouble. Which version do you use? – Marco Daniel Jun 16 '12 at 9:07

## closed as too localized by lockstep, Joseph Wright♦Jul 7 '12 at 22:04

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.