These steps describe hwo to enable LaTeX Workshop to generate a proper glossary.
Open the settings.json
file at the LaTeX Workshop extension position.
This is done easiest following these steps:
-
File → Preferences → Settings
-
In 'Search setting' input 'recipe'
-
The list gets filtered down considerably
-
-
Look for these two entries:
-
Latex-workshop > Latex: Recipes
-
Latex-workshop > Latex: Tools
-
Both entries have a edit in settings.json
link, pressing it will bring you directly to the correct section in the settings.json
.
Use that for the next two steps.
To generate the glossary entries an external tool called makeglossaries
is required.
This tool has already been installed automatically by installing the glossaries
package defined in the header.tex
file.
Now we need to teach LaTeX Workshop about its existence.
Add the following tool definition to the latex-workshop.latex.tools
array:
{
"name": "makeglossaries",
"command": "makeglossaries",
"args": [
"%DOCFILE%"
],
"env": {}
}
Similar to bibtex
generating glossaries is a little cumbersome.
You don’t have to run this every time you build the document, but every time you want the glossary to be updated properly (so at least run it before reviews).
We will define a recipe to do this job (running pdflatex
thrice is not a typo!).
Add the following recipe definition to the latex-workshop.latex.recipes
array:
{
"name": "pdflatex + makeglossaries",
"tools": [
"pdflatex",
"makeglossaries",
"pdflatex",
"pdflatex"
]
}