Latest news 2025-07-01: Ebook Sale July 2025. Cybercrime fiction short stories Unsocial Media and Smile for the Camera free; crime fiction short story The Briefcase free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99.

glossaries package FAQ

Why shouldn’t I use \include to include my glossary definitions? 🔗

Suppose you’ve defined all your glossary entries in a file called glossary-defs.tex and you want to use some or all of these entries in your document. The glossaries user guide says that you can use:

\loadglsentries[type]{filename}

to load the file. For example:

\loadglsentries{glossary-defs}
You can also use \input{filename} (e.g., \input{glossary-defs}) but you shouldn’t use \include{filename}, despite the number of web pages that suggest you can or should.

Although both \input and \include make TeX read the named file, these two commands aren’t equivalent. The first, \input, acts as though the contents of the file were written directly in your document in place of the \input command. The other one, \include, does a lot more than this. The command \include{file}:

Therefore, if you want to just input the contents of a file, \include is far less efficient than \input, can cause a spurious page break and creates a redundant extra file. So always use either \input or \loadglsentries to load your glossary definitions and only do this in the preamble.

2020-07-01 12:45:42


Permalink: https://www.dickimaw-books.com/faq.php?id=179
Alternative link: https://www.dickimaw-books.com/faq.php?itemlabel=include

Category: glossaries package
Topic: Defining Terms