Before I spend significant amount of time attempting to construct a MWE, I'd like to ask if there is a 'structural' reason that would prevent my use of endnotes within my glossaries?

I have created a system where, with a few lines of LaTeX code, I can easily decide whether to have footnotes or endnotes in any one of my chapters or sections.

In my project, I use footnotes and endnotes extensively. When I have a large figure on a page, I may choose to use endnotes in that chapter or section in lieu of footnotes to avoid a spacial conflict between the footnotes and the large figure.

When I attempt to add those "few lines of LaTeX code" to a glossary, however, I encounter the error "LaTeX Error: Missing \begin{document}." which to me hints that there may be a structure reason why endnotes and glossaries just don't mix.

If there is no structural reason why endnotes and glossaries cannot live together, I'll spend some time investigating how it can be done and post a different question if I run into a problem.

Thanks for reading.

  • If the answer is "yes you cannot do that", okay. But while reading the question, since I don't know the answer, what comes to my mind is that "okay I don't know, maybe try creating a small document that uses end note in glossary" ... which would end up being a MWE anyway.
    – user202729
    Commented Aug 24, 2022 at 17:44
  • @user202729 - Thank you for the comment. I am by NO means proficient in LaTeX, but have a monster of a project with +20k lines of code, and I am slow to program. I understand how critical MWE's are on the SE platform, and I work to provide them whenever I post a question, but in this case given how a "Missing \begin{document}" error points to a structural error, I thought to ask what may be for some a straightforward "no, you cannot do that" or "yes, it is possible". I'd expect that someone, somewhere has used endnotes with glossaries, but if not, the answer may be "okay I don't know". Commented Aug 24, 2022 at 18:03
  • @user202729 - I realized that your comment may have had to do with how I asked the question ... so I changed the question to obviate any need to include a MWE. The question now directly asks whether anyone has used endnotes in their glossary. If not, I can then decide whether to invest the effort to do something that no one else has, or at least will say they have. Thanks again for your comment. Commented Aug 24, 2022 at 19:42

1 Answer 1


It has been a few days since my original posting, but there have not been any answers to my original posting. It would appear to be an option that few may have employed.

So I gave it a try to see what was possible. It is not the best solution, but it is a step I the right direction. I haven't yet adopted the code into my own project, which was the reason for the original posting. So there may be additional changes I need to make to do so.

The reason I need to use endnotes in my glossaries is the competition between the many images I have in my glossaries and the footnotes that often appear at the bottom of the page. Without the footnotes, the images would often fit nicely on the glossary pages, but with the footnotes, the images are often too large, leaving large blank areas where the images would otherwise fit.

Hopefully I can adopt what I've created here to change the footnotes in my own project to endnotes in all of my glossaries.

Here is the MWE code:

% \usepackage{pagenote}     % I may need to use the pagenote package in my own project


% Here are a few glossary entries for testing purposes

        description={Of, relating to, or resulting from the influence of human beings on nature\footnote{Merriam-Webster's Unabridged Dictionary. (n.d.). \textit{Definition of Anthropogenic}. Www.Merriam-Webster.Com; © 2020 Merriam-Webster, Incorporated. Retrieved September 14, 2020, from \url{https://www.merriam-webster.com/dictionary/anthropogenic}} (Merriam-Webster, n.d.); created by people or caused by human activity\footnote{Dictionary.com. (n.d.). \textit{Definition of anthropogenic | Dictionary.com}. Www.Dictionary.Com. Retrieved September 14, 2020, from \url{https://www.dictionary.com/browse/anthropogenic}} (Dictionary.com, n.d.)} }

        description={(\textit{plural} \href{https://en.wiktionary.org/wiki/metrics}{metrics} \textit{or} \href{https://en.wiktionary.org/wiki/metrices}{metrices}) A \href{https://en.wiktionary.org/wiki/measure}{measure} for something; a means of deriving a \href{https://en.wiktionary.org/wiki/quantitative}{quantitative} \href{https://en.wiktionary.org/wiki/measurement}{measurement} or \href{https://en.wiktionary.org/wiki/approximation}{approximation} for otherwise \href{https://en.wiktionary.org/wiki/qualitative}{qualitative} \href{https://en.wiktionary.org/wiki/phenomena}{phenomena} (especially used in engineering)\footnote{metric. (2021, May 10). \textit{Wiktionary, The Free Dictionary}. Retrieved 20:25, July 15, 2021 from \url{https://en.wiktionary.org/w/index.php?title=metric&oldid=62505762} } } }

       \newglossaryentry{ocean gyre}{
        name={ocean gyre},
        description={A circular or spiral motion or form; especially a giant circular oceanic surface current. \ldots Gyre is also frequently encountered as an oceanographic term that refers to vast circular systems of ocean currents, such as the North Atlantic Gyre, a system of currents circling clockwise between Europe, Africa, and the Americas; gyre comes via the Latin gyrus from the Greek gyros, meaning "ring" or "circle"\footnote{Merriam-Webster. (n.d.). \textit{Definition of Gyre}. Www.Merriam-Webster.com. Retrieved July 23, 2019, from \url{https://www.merriam-webster.com/dictionary/gyre} } } }


% \makepagenote     % This is part of the pagenote package, but it is not needed here

\newlength\myl      % Used in \noteNnames macro

%_____ Add horizontal rule below "Notes" heading _____
\mbox{}\par\vskip-3.8\baselineskip\noindent%    % 3.8 controls  distance between the rule line and 'Notes ...'
\par\vskip-0.1\baselineskip}}   % The 0.1 is the distance between the rule line and the first endnote


% \noteNnames{Notes for \textit{<$title>}}      % Sets the Notes Title = <$title> (if it exists)
\noteNnames{Notes for the Glossary}     % Sets the Notes Title to 'Notes for the Glossary'

    Testing the glossary endnotes for \textbf{\gls{anthropogenic}}, \textbf{\gls{metric}} and \textbf{\gls{ocean gyre}} glossary entries.


% \printnotes*      % This is part of the pagenote package, but it is not needed here

% \newpage  % This controls whether there is a new page between the Glossary and the 'Notes ...'
\parindent 0pt
\parskip 2ex
\theendnotes    % Prints the endnotes


It may not be pretty, but it works. I hope that it may be helpful for others considering using endnotes for their glossaries.

  • 29 Aug 2022 - Added update to earlier answer to include a custom 'Notes for the Glossary' title along with an underline rule, with a few minor cosmetic adjustments. Enjoy! Commented Aug 29, 2022 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .