[Tex/LaTex] Creating glossary entries in separate file

glossaries

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.

Best Answer

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
\loadglsentries{foo}
\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}}
}

enter image description here

Related Question