26

I am using the glossaries package to make a glossary. However I don't want the page numbers where the entry is referenced to be shown after the description in the glossary. How can I do that? Actually I use in preamble:

\usepackage[acronym]{glossaries}
\makeglossaries

and inside the document:

\printglossary[type=main,style=long]

I don't want the page numbers to be displayed because there are entries that are added in preamble with the command \glsadd{entry} and it will appear as present on page 1. And sometimes the page numbers list won't be complete, that is, there will be parts of the text which will contain one term and it won't reference directly the glossary.

How to prevent the page number to appear on glossary?

40

Throwing a glance at p. 90 of the glossaries manual, I suppose that the package option nonumberlist does the trick.

So change:

\printglossary[type=main,style=long]

to:

\printglossary[type=main,style=long,nonumberlist]
  • 1
    Thanks for pointing the solution. The option nonumberlist gives the following error: ! LaTeX Error: Option clash for package glossaries. However I made it to work using: \renewcommand*{\glossaryentrynumbers}[1]{} – Weslei Mar 10 '11 at 18:42
  • 3
    This works in my case: \usepackage[acronym,nonumberlist]{glossaries} – Khaaba May 31 '16 at 4:39
  • @Khaaba This is the correct answer. Would you mind posting it as such? – Toivo Säwén Apr 26 at 11:53
  • @Toivo Säwén, give a check below. Added as an answer for your reference only since the question has marked answered already. – Khaaba Apr 27 at 6:32
15

put option nonumberlist as option of printglossary

\printglossary[type=main,style=long,nonumberlist]

if print the glossary using printnoidxglossary use option nonumberlist as well

\printnoidxglossary[type=\acronymtype,title=Abreviations,nonumberlist]

\printnoidxglossary[title=Symbol,nonumberlist]
2

The glossaries package now has a command, \glsaddallunused, that will add all unused terms to the glossary without including a phantom page number. Place it in your document after its content but before you print the glossaries. It will print accurate page numbers for terms used in your document but no page number for those that were not. Please see the latest documentation for more details.

1

@Toivo Säwén, here is the sample. You may play removing nonumberlist in the package option of glossaries and see what happens.

\documentclass{article}
\usepackage{lipsum,hyperref}

\usepackage[acronym, nonumberlist]{glossaries}
\makenoidxglossaries
\newglossaryentry{potato}{name={potato},plural={potatoes},description={starchy tuber}}
\newglossaryentry{cabbage}{name={cabbage},description={vegetable with thick green or purple leaves}}
\newglossaryentry{carrot}{name={carrot},description={orange root}}

\setacronymstyle{long-short}
\newacronym{svm}{SVM}{support vector machine}
\newacronym{nehu}{NEHU}{North-Eastern Hill University}

\begin{document}
\lipsum[1-3]

Chop the \gls{cabbage} and \glspl*{carrot}. First meaning less appearance in \gls{svm} and then \gls{svm} and \gls{nehu}

\lipsum[1-6]

Slice the \gls{cabbage} and \glspl{potato}. Second appearance in \gls{svm} and then \gls{svm} and \gls{nehu}

\printnoidxglossaries
\end{document}
0

What worked in my case was to load the glossaries package with option nonumberlist (see manual p.28):

\usepackage[nonumberlist]{glossaries}
0

For me this worked to remove numbers being printed:

\printacronyms[style=mcolindex, title=Abbreviations, nonumberlist]

style=mcolindex allows for 2 columns of abbreviations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.