9

When I have many glossary words that describe the same, how do I neatly put these into the glossary? Ideally, something like:

\newglossaryentry{digest, hash, hash code} {
name=digest, description={The output of a hash function).}
}

producing

   digest, hash or hash code The output of a hash function.

is what I'm looking for, and I can't seem to find this anywhere.

1 Answer 1

11

I'd define one entry (say, digest) in the usual way and then use \gls{digest} in the description field of the alternative entries. See section 8 of the glossaries manual for details.

\documentclass{article}

\usepackage[nonumberlist]{glossaries}
\makeglossaries

\newglossaryentry{digest}{name={digest (\textmd{also} hash, hash code)},%
    text=digest,description={The output of a hash function}}

\newglossaryentry{hash}
    {name=hash,description={\emph{See} \gls{digest}}}

\newglossaryentry{hash code}
    {name={hash code},description={\emph{See} \gls{digest}}}

\begin{document}

\null\vfill% just for the example

Some text about \gls{digest}.

Some text about \gls{hash}.

Some text about \gls{hash code}.

\printglossaries

\end{document}

enter image description here

0

You must log in to answer this question.

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