I’m getting dangling glossary entries. If an acronym or glossary entry is not referenced by the main document, only from other glossary entries (which are referenced from the main document and thus show up in the glossary chapter), they do not end up in the PDF, and hyperref shows they are dangling:
pdfTeX warning (dest): name{glo:foobar} has been referenced but does not exist, replaced by a fixed one
pdfTeX warning (dest): name{glo:foo} has been referenced but does not exist, replaced by a fixed one
MWE
\documentclass{article}
\usepackage{hyperref}
\hypersetup{
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
}
\usepackage[nonumberlist,style=altlist]{glossaries}
\makeglossaries
\newacronym{foo}{foo}{first metasyntactic variable}
\newacronym{meow}{meow}{the sound a cat makes}
\newglossaryentry{foobar}
{
name=foobar,
description={combination of two metasyntactic variables,
but also often used as \emph{fubar}}
}
\newglossaryentry{bar}
{
name=bar,
description={second metasyntactic variable, see also
\gls{foo}, \gls{foobar}, \gls{baz}}
}
\newglossaryentry{baz}
{
name=baz,
description={third metasyntactic variable, see also
\gls{foo}, \gls{bar}}
}
\newglossaryentry{eins}{name=eins,description={eins, siehe \gls{zwei}}}
\newglossaryentry{zwei}{name=zwei,description={zwei, siehe \gls{drei}}}
\newglossaryentry{drei}{name=drei,description={drei, siehe \gls{vier}}}
\newglossaryentry{vier}{name=vier,description={vier, siehe \gls{fynf}}}
\newglossaryentry{fynf}{name=fynf,description={fynf, siehe \gls{sechs}}}
\newglossaryentry{sechx}{name=sechs,description={sechs, siehe \gls{sieben}}}
\newglossaryentry{sieben}{name=sieben,description={sieben, siehe \gls{acht}}}
\newglossaryentry{acht}{name=acht,description={acht, und alle haben mitgemacht}}
\begin{document}
bla bla \gls{bar} bla bla \gls{baz} bla bla \gls{eins} bla bla
\newpage
\printglossaries
\end{document}
The resulting glossary chapter has only bar and baz but not those entries they refer to, even though they ought link to them. (However, meow should not show up.) Similarily, entries eins through acht should also show up (i.e. something that limits nesting is not acceptable; in reality, this will likely not nest that much, but as generation of the PDF is automated, I require a way that permits me to script this and, if looping is needed, to be able to break the loop in a deterministic fashion).
After some comments, I have added a request to the latex-maven-plugin to allow repeating running makeglossaries as a quick workaround (with limited recursion depth, of course)… for now. (The question still stays open, I cannot rely on bib2gls or test it yet.)
makeglossariesscript I see all\glsusages expanded in the glossary – Feb 09 '17 at 17:49pdflatex mwe.texthenmakeglossaries mwethen twice pdflatex again. – mirabilos Feb 09 '17 at 17:51pdflatex ; makeglossaries ; pdflatex ; makeglossaries ; pdflatex– Feb 09 '17 at 17:52makeglossariesmultiple times, I think. I tried to write a script which would automate this as it is very difficult to ensure you run it enough times, compiling the document in between, but it does not work terribly well so I can't recommend it. I keep wondering if glossaries would not be better handled using the frameworks we have for bibliographies .... Something like Biblatex/Biber but Glslatex/gliber, perhaps ;). – cfr Feb 09 '17 at 18:14makeglossariesoutput file perhaps) which stays deterministic, i.e. I could recognise “this file didn’t change from the lastmakeglossariesrun” and abort the loop thus? – mirabilos Feb 09 '17 at 18:21