vscode: You must invoke LaTeX with the -shell-escape flag.

阅读量: searchstar 2021-04-13 23:59:34
Categories: Tags:

.vscode/settings.json里写入:

{
"latex-workshop.latex.magic.args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-shell-escape",
"%DOC%"
],
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-shell-escape",
"%DOC%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-shell-escape",
"%DOC%"
]
},
]
}

参考文献:
https://blog.csdn.net/qq_45890199/article/details/105330856