I have problems referencing a numbered section containing a glossary from the glossaries package.
\documentclass{article}
\usepackage{glossaries}
\makeglossary
\newglossaryentry{ge}{
name=glossary entry,
description=with a long description
}
\begin{document}
\section{Section}
This \gls{ge} is listed in the glossary in Section \ref{sec:glossary}. % 1
This reference is wrong as the glossary is actually in Section 2.
\printglossary[numberedsection]
\label{sec:glossary}
\end{document}
While this code should reference the glossary in section 2 it actually assumes that the glossary is in section 1.