[Tex/LaTex] Problems with glossaries package ‘see’ attribute

glossaries

I'm using the glossaries package to define a glossary (who would have thought of that). Yesterday I came across the feature to be able to use see={other glossary entry, another one, etc.} which I like very much. But using this feature something funny happened. I have one central glossary file for all my documents. So I am dependent on glossaries to only include those entries from the file that I actually did use in the document. But what happens now is that all entries for which the see attribute is used, are included in the glossaries even though not referenced in the document.

To clarify: If I create an empty LaTeX document inserting the glossary file via \input{glossary.tex} those entries that have the see attribute will end up in a glossary in the document, though the document itself is completely empty.

Is this behavior meant to be? Did I miss something?

I hope someone can tell me what I'm doing wrong (if this is not meant to be).

Best Answer

I guess you import your glossary entries after \makeglossaries. You have to do this before. Note furthermore that it is generally better to use \loadglsentries than \input to import glossary entries. Thus:

\documentclass{article}

\usepackage{glossaries}

\loadglsentries{glossary.tex}

\makeglossaries

\begin{document}

\printglossary

\end{document}