I'm trying to create a glossary for my document but am having trouble getting it to show up.
The last three lines of my document are:
\newpage
\printglossaries
\end{document}
I've also got:
\makeglossaries
before
\begin{document}
I tried running:
makeindex -l -s report.ist -o report.gls report.glo
And also:
makeglossaries report.glo
Both times, the output was:
This is makeindex, version 2.15 [TeX Live 2013] (kpathsea + Thai support).
Scanning style file ./report.ist.............................done (29 attributes redefined, 0 ignored).
Scanning input file report.glo...done (0 entries accepted, 0 rejected).
Nothing written in report.gls.
Transcript written in report.ilg.
I tried following this tutorial. I also looked at the beginners guide, which actually shows \printglossary
as the command. I tried both, neither worked. The acronyms I have defined in the document are behaving as expected, I just don't see a glossary at the end of my report documenting them. Can you give me any pointers?
Best Answer
Without a minimal working example (MWE) this is just guesswork, but as you mentioned that you have defined acronyms and they are behaving as expected, I suspect you have used the
acronym
package option, like this:This creates two glossaries. The default
main
glossary and theacronym
glossary. In this case, any acronyms defined using\newacronym
will be assigned to theacronym
glossary (unless you explicitly change the glossary type). Any entries defined using\newglossaryentry
(without designating a type) will automatically be assigned to themain
glossary.Each glossary has its own associated file used to store information for
makeindex
(orxindy
) to process. The file used for themain
glossary has the extension.glo
. The file used for theacronym
glossary has the extension.acn
.This message from
makeindex
indicates that the.glo
file is empty. This means that you haven't referenced any entries in the main glossary. If you have defined and referenced acronyms in your document, then they are in another file, and that's the file that needs to be processed bymakeindex
. The easiest way to ensure that all files are processed is to usemakeglossaries
without specifying an extension:You wrote that you tried
which tells
makeglossaries
to only process the.glo
file and ignore any other glossary files.Here's a MWE:
If this file is called
test.tex
, thenpdflatex test
will create (amongst other files)test.glo
(which is empty) andtest.acn
(which has one line). Now,makeglossaries test
will create a file calledtest.acr
and will complain thattest.glo
is empty. The next time you runpdflatex test
,\printglossaries
will inputtest.acr
and the list of acronyms will be displayed.If you don't intend to use the
main
glossary, then I recommend you suppress its creation using thenomain
package option. This will prevent the creation of an unnecessary file and will stopmakeglossaries
from complaining about the empty.glo
file.