VS Code - Latex Workshop - custom recipes file location

Assume that you have to make a recipe that uses pdflatex once only, not pdflatex > biblatex > pdflatex > pdflatex.

In settings.json:

  • Add this to "latex-workshop.latex.recipes":

    {
        "name": "pdflatex",
        "tools": [
          "pdflatex"
        ]
    }
    
  • Add this to "latex-workshop.latex.tools" if it is not present:

    {
        "name": "pdflatex",
        "command": "pdflatex",
        "args": [
            "--shell-escape", // if you want to have the shell-escape flag
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOC%.tex"
        ]
    }
    

Don't forget to add the .tex after "%DOC%".


To edit recipes you should go on the Code Tab (from the name of the program, Visual Studio Code), then Preferences, and from there Settings. Open the tree for the Extension settings and you will find your LaTeX (Workshop) settings. Click on "Edit in settings.json" and you will see the file opened for your edits.


Here is how I entered in settings.json and it worked well. Thanks user156344.

{
"workbench.colorTheme": "Noctis",
"editor.fontFamily": "'Droid Sans Fallback', 'Droid Sans Mono', 'monospace', monospace",
"editor.fontSize": 20,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 5000,
"latex-workshop.view.pdf.viewer": "tab",

"latex-workshop.latex.tools":[
    {
"name": "pdflatex",
"command": "pdflatex",
"args": [
    "--shell-escape", // if you want to have the shell-escape flag
    "-synctex=1",
    "-interaction=nonstopmode",
    "-file-line-error",
    "%DOC%"
  ]
 }
],


 "latex-workshop.latex.recipes":[
   {
     "name": "pdflatex",
     "tools": [
       "pdflatex"
       ]
     }
   ]
}