1

I'm very new to Latex and I'm trying to setup a glossary. I need to execute a post processing step, but I can't find how can I add this command to the compilation using VS Code. The command is:

makeindex -s template.ist -t template.glg -o template.gls template.glo -s "%tm.ist" -t "%tm.glg" -o "%tm.gls" "%tm.glo"
Cris
  • 121

1 Answers1

1
  1. Open your settings.json
  2. Under "latex-workshop.latex.tools" add a new entry with your desired post-processing operation. The arguments and command depend on what you want to do, in my case it's generating a glossary so I just need the following:
        {
            "name": "makeglossaries",
            "command": "makeglossaries",
            "args": [
                "%DOCFILE%"
            ],
            "env": {}
        },
  1. Under "latex-workshop.latex.recipes" add a new entry. The order of the elements in "tools" is very important. In this case makeglossaries could go after or before bibtex, it doesn't really matter:
        {
            "name": "pdflatex ➞ makeglossaries ➞ bibtex ➞ pdflatex × 2",
            "tools": [
                "pdflatex",
                "makeglossaries",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
  1. Press CTRL+S to save your settings.
  2. Now press CTRL+SHIFT+P to open the command palette. Search for LaTeX Workshop: Build with recipe and select your recipe. Done.
Cris
  • 121