Currently I am using the acronym
package to generate a glossary of acronyms, but I would like to also have a glossary of mathematical symbols. Therefore, I am looking to move to the glossaries
package. I am having issues (detailed below) that the glossary section is not generated and so would like to know what is the simplest way to do this?
Below is a simple WORKING use case with acronym
, from which I can generate a pdf, on mac os X, in texmaker (4.4.1) running the quick build option;
PdfLaTex + Bib(la)tex + PdfLaTex(x2) + View Pdf
main.tex:
\documentclass{article}
\usepackage{acronym}
\usepackage[backend=bibtex,bibencoding=ascii]{biblatex}
\addbibresource{example_bib.bib}
\begin{document}
\section{Body}
Try printing \ac{aa} and citing something.\cite{a_reference}
\section{Acronyms}
\begin{acronym}[AAAAAAA]
\acro{aa}[AA]{An Acronym}
\end{acronym}
\printbibliography
\end{document}
example_bib.bib:
@ARTICLE{a_reference,
author = {A, Name},
title = {A Title},
volume = {1},
pages = {1--2},
abstract = {an abstarct},
date = {2013-06},
doi = {10.1016/j.commatsci.2013.03.013},
issn = {0927-0256},
journaltitle = {Computational Materials Science},
keywords = {Keyword},
shortjournal = {Computational Materials Science},
url = {http://www.sciencedirect.com},
urldate = {2015-10-28}}
If I try adapting the main.tex file to:
\documentclass{article}
\usepackage[acronym]{glossaries}
\usepackage[backend=bibtex,bibencoding=ascii]{biblatex}
\makeglossaries
\newacronym{aa}{AA}{An Acronym}
\addbibresource{example_bib.bib}
\begin{document}
\section{Body}
Try printing \gls{aa} and citing something.\cite{a_reference}
\printacronyms
\printbibliography
\end{document}
It runs, but there is NO glossary section output to the pdf! (the acronym is inserted in the body text)
This is also the case if I try using glossary terms:
\documentclass{article}
\usepackage{glossaries}
\usepackage[backend=bibtex,bibencoding=ascii]{biblatex}
\makeglossaries
\newglossaryentry{aa}{name=aa,description={A description of AA}}
\addbibresource{example_bib.bib}
\begin{document}
\section{Body}
Try printing \gls{aa} and citing something.\cite{a_reference}
\printglossaries
\printbibliography
\end{document}
I have looked at a number of questions on here related to this issue, but none seem to provide an adequate answer.
Best Answer
The quick and easy method is to just add the
automake
option:This requires two
pdflatex
invocations, but you've got that already with yourPdfLaTex + Bib(la)tex + PdfLaTex(x2) + View Pdf
build. This method makes use of TeX's shell escape mechanism. This is commonly set to restricted mode, which only allows trusted applications to run. Luckily,makeindex
is a trusted application.The
makeglossaries
Perl script supplied with theglossaries
package runsmakeindex
(orxindy
), but it also provides some diagnostic information. (Some ofxindy
's messages are a bit cryptic.) egreg's answer to another question shows how to integratemakeglossaries
with texmaker.Personally, I prefer to use
arara
. With this method I just need to put some special comments in my source code:(There's a question on integrating texmaker with arara.)
You asked for some top tips in the comments. Here are the ones that I can think of off the top of my head:
\newglossaryentry
,\newacronym
etc) in the preamble or put them in a separate file and load them in the preamble using\input
or\loadglsentries
.\gls
in section/chapter/captions etc. If you really need them, use the commands like\glsfmttext{label}
,\glsfmtshort{label}
or\glsfmtlong{label}
provided by theglossaries-extra
package.If your terms contain commands or special characters, provide the
sort
key. For example:If you want to use commands like
\Gls
that convert the first letter to upper case, be careful of the restrictions imposed by\makefirstuc
(provided bymfirstuc
). So the above examples should really be:(These types of entry shouldn't have any case-changing applied even if they do occur at the start of a sentence. The empty brace at the start of the value discards the attempt to change case, which would otherwise cause problems.)
If things go wrong, for example, your glossary doesn't appear or has entries missing, try the
makeglossariesgui
application to see if it can detect the problem.Related resources: