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",
相关推荐
Hello World . .4 天前
Linux:线程间通信
linux·开发语言·vscode
被制作时长两年半的个人练习生4 天前
claude code for vscode 配置 qwen3.5
ide·vscode·claude code·qwen3.5
圣心4 天前
Visual Studio Code 中的 AI 智能操作
ide·人工智能·vscode
吹牛不交税4 天前
关于vscode左侧资源管理器目录层级疑似异常的问题
ide·vscode·编辑器
嵌入小生0074 天前
线程间通信---嵌入式(Linux)
linux·c语言·vscode·嵌入式·互斥锁·线程间通信·信号量
琛説4 天前
彻底解决 Codex / Copilot 修改中文乱码【含自动化解决方案】
vscode·copilot·codex
学嵌入式的小杨同学4 天前
嵌入式硬件开发入门:PCB 设计核心流程 + 基础元器件实战指南
vscode·后端·嵌入式硬件·架构·vim·智能硬件·pcb工艺
刘恒1234567895 天前
VSCODE
vscode
你怎么知道我是队长5 天前
VsCode插件推荐---Todo Tree
ide·vscode·编辑器
becatjd5 天前
VScode的claude code插件报错command ‘claude-vscode.editor.openLast‘ not found
ide·vscode·编辑器·claude·anthropic·claude code