5

I am yet to create my list of abbreviations and symbols using the package Glossary. Since i am done with my thesis, i wont be referencing the glossary entries in the text where i used them. Is it possible that with the glossary package i can still print my abbreviations without ever referencing them?

3 Answers 3

5

Is there a really good reasen why you want to use the obsolete package glossary? If not, I would suggest switching to the newer package glossaries. Using this package you can add entries, that were never referenced in you text, to your list of abbreviations using the following command.

\glsadd{}
1
  • 1
    I had challenges using \glsadd{}, perhaps i wasnt using it the right way. But i figured putting \glsaddall after \begin{document} but before \printglossary works fine!! Commented Jun 12, 2017 at 23:17
5

An alternative to using \glsaddall is to use \printunsrtglossary provided by the extension package glossaries-extra. This command simply iterates over all defined entries (in the order in which they were defined) for the given glossary.

Example:

\documentclass{report}

\usepackage[abbreviations,symbols,style=index]{glossaries-extra}

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{ssi}{SSI}{server-side includes}
\newabbreviation{xml}{XML}{extensible markup language}

\glsxtrnewsymbol[description={cardinality of the set $\mathcal{S}$}]
 {cardS}{$|\mathcal{S}|$}
\glsxtrnewsymbol[description={imaginary number $\sqrt{-1}$}]{i}{$i$}
\glsxtrnewsymbol[description={pi}]{pi}{$\pi$}
\glsxtrnewsymbol[description={a set}]{S}{$\mathcal{S}$}
\glsxtrnewsymbol[description={universal set}]{U}{$\mathcal{U}$}

\begin{document}
\printunsrtglossary[type=abbreviations]
\printunsrtglossary[type=symbols]

\end{document}

Build sequence (where the source file is called mydoc.tex):

latex mydoc

(or pdflatex or xelatex or lualatex)

Page 1:

image of list of abbreviations

Page 2:

image of list of symbols

Compare with:

\documentclass{report}

\usepackage[abbreviations,symbols,style=index,nonumberlist]{glossaries-extra}

\makeglossaries

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{ssi}{SSI}{server-side includes}
\newabbreviation{xml}{XML}{extensible markup language}

\glsxtrnewsymbol[description={cardinality of the set $\mathcal{S}$}]
 {cardS}{$|\mathcal{S}|$}
\glsxtrnewsymbol[description={imaginary number $\sqrt{-1}$}]{i}{$i$}
\glsxtrnewsymbol[description={pi}]{pi}{$\pi$}
\glsxtrnewsymbol[description={a set}]{S}{$\mathcal{S}$}
\glsxtrnewsymbol[description={universal set}]{U}{$\mathcal{U}$}

\glsaddall

\begin{document}
\printglossary[type=abbreviations]
\printglossary[type=symbols]

\end{document}

Build process:

latex mydoc
makeglossaries mydoc
latex mydoc

Pros and Cons

  • \printunsrtglossary doesn't require any external tools so no modification is needed to the build sequence.
  • \printglossary requires an indexing application to sort and collate and then another LaTeX run.
  • \printunsrtglossary doesn't sort, so you need to make sure you define the terms in the order you want them to appear in the glossary.
  • \glsaddall adds the same number to the location list of every entry, so you need nonumberlist to hide the location lists, since they're not relevant.
0

a simple solution is the following template

\usepackage{glossaries}
\makeglossaries

\newglossaryentry{something}
{
    name=somthing,
    description={an un known thing}
}
    

\title{my glossary}
\begin{document}
\maketitle
 
\glsaddall
\printglossaries

\end{document}

" \glsaddall " will show all glossary items even the ones that are not referred to within the document text.

2
  • Welcome to TeX.SE!
    – Mensch
    Commented Dec 19, 2022 at 19:25
  • Thank you @Mensch Commented Dec 31, 2022 at 22:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .