% This file is public domain
% If you want to use arara, you need the following directives:
% arara: pdflatex: { synctex: on }
% arara: makeglossaries
% arara: pdflatex: { synctex: on }
% arara: pdflatex: { synctex: on }
%
%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sample-numberlist
\documentclass{report}

%\usepackage[colorlinks]{hyperref}
\usepackage[savenumberlist,counter=chapter]{glossaries}

\makeglossaries
%\makenoidxglossaries % option 1 ("noidx")


\newglossaryentry{sample}{name=sample,description=an example}

\begin{document}
\chapter{Introduction}

This is a \gls{sample} document. \Glspl{sample}
are discussed in chapters~\glsdisplaynumberlist{sample}
(or \glsentrynumberlist{sample}).

\chapter{Sample Documents}

\Gls{sample} documents are provided for testing and illustration
purposes.

\chapter{More About Samples}

Here's more information about \glspl{sample}.

\chapter{Another chapter}

A chapter about something else.

\chapter{Another About Samples}

Here's some more information about \glspl{sample}.

\chapter{And Another Sample Chapter}

Here's another \glspl{sample}.

\printglossaries
%\printnoidxglossaries % option 1 ("noidx")
\end{document}
