I want to use the VS Code extension LaTeX Workshop and I want to set up my own recipe for compiling the documents. The FAQ's are good but missing the part where they tell where the recipes are stored and where to put your custom recipe. Could someone help me out on that?
Asked
Active
Viewed 5.0k times
3 Answers
29
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%".
6
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"
]
}
]
}
O'Neil
- 205
Suresh Raja
- 161
4
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.
massimopinto
- 41
latexmk. As for the second recipe: look at the amazing use of BibLaTeX. – Mar 11 '19 at 14:03