[Tex/LaTex] glossaries: display the page number but not the current page

acronymsformattingglossaries

I have been looking around the web for a few days for this problem, but I can't find a solution. I created a glossary for my thesis and when I display it I see the current page number at the end of the description. For example, I have the following result:

Computer is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. [current page] [another page] [yet another page].

I would like to remove the [current page] from the list of page number and only that one. Is that something possible?

The same problem appens with acronyms.

Here is a small code that illustrates my probleme

\documentclass{book}
\usepackage{hyperref}
\usepackage{glossaries}
\makeglossaries

\begin{document}

%%%%% Glossaire %%%%%
\newacronym{fps}{FPS}{Frame Per Second}         % Unused but display this page
\newglossaryentry{computer}                     % Used but I don't want to see the page 1
{
  name=Computer,
  text=computer,
  description={is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format.},
  plural=computers
}

\renewcommand*{\glossaryname}{Glossaire}    % Change the default name of the glossary
\renewcommand*{\glspostdescription}{}       % Delete the trailing point if using package glossaries with nonumberlist as arguments
\glsaddall                      % Add all the terms in the glossairy (these.glo)
\printglossaries                % Print all the terms included in these.glo
\clearpage
%%%%%%%%%%%%%%%%%%%%%

%%%%% Example %%%%%%%
\chapter{Super Title}
Here I use the reference to a \gls{computer}. It's a small example that show my problem.

\end{document}

To compile I do the following

pdflatex document.tex
makeglossaries document.glo
pdflatex document.tex
pdflatex document.tex

Best Answer

The problem is that \glsaddall adds all entries in the glossary together with their current location to the "number list".

So, you should use \glsaddallunused instead of \glsaddall. The former skips any entries that have already been used and also will ignore the current location in the number list.

Just remember to put this command after all of your used entries, otherwise glossaries doesn't knows which entries have been used.

So, I suggest you to put this command just before \end{document}, as in the following MWE:

\documentclass{book}
\usepackage{hyperref}
\usepackage{glossaries}
\makeglossaries

\begin{document}

%%%%% Glossaire %%%%%
\newacronym{fps}{FPS}{Frame Per Second}         % Unused but display this page
\newglossaryentry{computer}                     % Used but I don't want to see the page 1
{
  name=Computer,
  text=computer,
  description={is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format.},
  plural=computers
}

\renewcommand*{\glossaryname}{Glossaire}    % Change the default name of the glossary
\renewcommand*{\glspostdescription}{}       % Delete the trailing point if using package glossaries with nonumberlist as arguments
\printglossaries                % Print all the terms included in these.glo
\clearpage
%%%%%%%%%%%%%%%%%%%%%

%%%%% Example %%%%%%%
\chapter{Super Title}
Here I use the reference to a \gls{computer}. It's a small example that show my problem.

\glsaddallunused                % Add all the unused terms in the glossairy (these.glo)
\end{document} 

Output:

enter image description here