vscode 配置 latex

  • 下载插件
    安装插件前自行安装 texlive, 按照 https://tug.org/texlive/ 要求安装
  • 找到 settings
  • 打开 json 文件
  • json 文件中添加如下配置
json 复制代码
    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "-output-directory=%OUTDIR%",
                "%DOCFILE%",
            ]
        },
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-output-directory=%OUTDIR%",
                "%DOCFILE%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-output-directory=%OUTDIR%",
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%OUTDIR%/%DOCFILE%",
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "pdflatex -> bibtex -> pdflatex*2",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
        {
            "name": "PDFLaTeX",
            "tools": [
                "pdflatex"
            ]
        },
        {
            "name": "XeLaTeX",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "BibTeX",
            "tools": [
                "bibtex"
            ]
        },
        {
            "name": "LaTeXmk",
            "tools": [
                "latexmk"
            ]
        },
        {
            "name": "xelatex -> bibtex -> xelatex*2",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        }
    ],
    "latex-workshop.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist",
        "*.fls",
        "*.log",
        "*.fdb_latexmk"
    ],
    "latex-workshop.latex.autoClean.run": "onFailed",
    "latex-workshop.formatting.latex": "latexindent",
    "latex-workshop.latex.autoBuild.run": "onSave",
    "latex-workshop.latex.clean.subfolder.enabled": true,
    "latex-workshop.latex.outDir": "./build",
相关推荐
知福致福14 小时前
vscode连接远程服务器登录codex插件一直卡在gpt图标页,不跳转浏览器登录
服务器·vscode·gpt
A小调的码农15 小时前
OPENOCD+MSYS+VSCODE:从“灯不亮“到“终于亮了“
ide·vscode·stm32·单片机·编辑器
hkj880818 小时前
vscode提交gitee远程仓库出现Permission denied (publickey)解决方法
ide·vscode·gitee
p似笑非笑3 天前
在Mac上完美配置VSCode的C/C++开发环境(GCC/G++详细教程)
c语言·vscode·macos
daad7773 天前
记录vscode连接matlab启动环境搭建
java·vscode·matlab
Luoxi_84 天前
Anaconda超详细的安装教程+VScode的使用
ide·vscode·编辑器
无糖冰可乐214 天前
安装wsl2,并链接Windows上的vscode运行项目
pytorch·vscode·python·pip
流量猎手4 天前
Vscode登陆服务器
服务器·ide·vscode
开发者联盟league5 天前
cmake项目使用导入静态库的方式添加源文件
ide·vscode·编辑器
巴渝小禹5 天前
【VSCODE】使用技巧
vscode