# How do I refer to the glossary section using ref?

I am using the glossaries package. In the document, I would like to say "Please, refer to section \ref{my-glossary}". How can I do that?

Here's an example.

In the file notes.tex

\documentclass[12pt]{article}

\usepackage[section,numberedsection=autolabel]{glossaries}

\makeglossaries

\newacronym{vae}{VAE}{variational auto-encoder}

\begin{document}

%\maketitle

\tableofcontents

\section{Abstract}
\acrshort{vae}.

\clearpage
\printglossary[type=\acronymtype]\label{my-glossar}

\bibliography{biblio}
\bibliographystyle{plain}

\end{document}

• Have you added a \label{my-glossar} after the corresponding section/chapter? – Dr. Manuel Kuehner May 26 at 17:34
• @Dr.ManuelKuehner The section is generated automatically using the command \printglossary, so I don't know how to add \label. – nbro May 26 at 17:36
• Try to add ist right after the  \printglossary command. – Dr. Manuel Kuehner May 26 at 17:37
• @Dr.ManuelKuehner I did that, but it refers to the section before the glossary. – nbro May 26 at 17:38
• See answer (untested, no MWE from your side). – Dr. Manuel Kuehner May 26 at 17:39

Solved by trial and error: reading the manual and looking at Using Texmaker with glossaries on Windows.

\documentclass[12pt]{article}

\usepackage[
toc,
section,
numberedsection = autolabel,
automake,
]{glossaries}
\glstoctrue

\makeglossaries %makeglossaries %

\newacronym{vae}{VAE}{variational auto-encoder}
\makeglossaries
\begin{document}

\tableofcontents

\section{Abstract}
\acrshort{vae}.


• The glossary now appears in the table of contents, but \ref refers to the previous section before the glossary, in my case, section 5. – nbro May 26 at 17:43