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.
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.
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}}
}
I gave up on \loadglsentries with a memoir document class. Instead, create pages/foo.sty with your glossary entries:
\documentclass{article}
\usepackage{glossaries}
\makeglossaries
\usepackage{pages/foo}
\begin{document}
\gls{foobar} is a strange animal
\gls{foo} is another strange animal
\printglossaries
\end{document}
\newglossaryentry- definitions in a separate file, say,foo.texand use\input{foo}or\loadglsentries{foo}– Jan 11 '16 at 12:53