I'm trying to create a glossary using Pandoc with Markdown in, PDF (/LaTeX) out. I've followed the documentation here which uses the glossaries
library. Everything seems to be working, except actually printing out the glossary! And yes, I have \printglossaries
in my template.
The documentation there mentions
File processing must now include a call to
makeglossaries
followed by at least one further invocation oflatex
orpdflatex
.
which...I haven't done, because I don't know how. Is there a canonical or easy way to run latex
or pdflatex
again, as it says, using pandoc?
What I've done so far:
Made a copy of the default template (using
pandoc -D latex
) and added this right after$body$
, before the bibliography stuff:$if(glossary)$ \printglossaries $endif$
Updated my main doc YAML metadata to include
glossary: true
.My
header-includes
section looks like this:header-includes: - \usepackage{glossaries} - \makeglossaries - \newglossaryentry{foo}{name=bar, description={baz}}
- In the document I have
\gls{foo}
in an arbitrary location near the beginning, which does get hyperlinked, just...to nowhere. - Compile using
pandoc --standalone --template=aui.latex my_document.md -o my_document.pdf
.
I've also tried without the conditional glossary
variable stuff, just in case that's what was breaking things, but there's no change.
pandoc -o out.tex && pdflatex out.tex && pdflatex out.tex
pdflatex out.tex
twice. @scoa sure, let me update the question.