# Creating glossary entries in separate file

Is there any way around to create glossary entries in separate file? I do prefer to store glossary entries in a separate file.

Thanks for any comment.

• Welcome to TeX.SX! You can store \newglossaryentry - definitions in a separate file, say, foo.tex and use \input{foo} or \loadglsentries{foo} – user31729 Jan 11 '16 at 12:53
• I have answered your question -- please accept it. – user31729 Mar 7 '18 at 6:55

The \loadglsentries[type]{file name} command should be used for external definitions, since this allows for selecting specific glossary types (only useful for more than one glossary, however).

\documentclass{article}

\usepackage{glossaries}

\makeglossaries
\begin{document}

\gls{foobar} is a strange animal

\gls{foo} is another strange animal
\printglossaries

\end{document}


The foo.tex file contains the glossary definitions:

\newglossaryentry{foobar}{%
name={Foobar},
description={A strange animal, not to be confused with \gls{foo}}
}

\newglossaryentry{foo}{%
name={Foo},
description={A strange animal, not to be confused with \gls{foobar}}
}


• Why can't one use \input{fooglossary}? Thanks. – tommy.carstensen Dec 1 '17 at 13:40
• @tommy.carstensen: According to the glossaries manual you can use \input .... – user31729 Dec 1 '17 at 15:47
• Why are there 1s at the end of each glossary definition? How does one remove them? – Pertinax Sep 16 at 9:38