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

.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

posted @ 2024-09-28 13:37  寻找繁星  阅读(0)  评论(0编辑  收藏  举报