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",
相关推荐
成遇9 天前
在Vscode中安装Sass并配置
vscode·rust·sass
API开发10 天前
苹果芯片macOS安装版Homebrew(亲测) ,一键安装node、python、vscode等,比绿色软件还干净、无污染
vscode·python·docker·nodejs·openssl·brew·homebrew
微风好飞行10 天前
Vite 打包 vscode 扩展遇到的模块问题
javascript·vscode·vite
Jay_51510 天前
如何获取 vscode 的 vsix 离线插件安装包
vscode·vsix
:-)10 天前
VSCode新窗口背景水印logo修改美化
ide·vscode·编辑器
HarryHY10 天前
Vscode自定义代码快捷方式
前端·javascript·vscode
黑塞12311 天前
Vscode 编写Markdown支持 plantuml书写
ide·vscode·编辑器·markdown·plantuml
linweidong11 天前
一站式用AI编程神奇Cursor/Trae(VScode环境)开发运行Scala应用
大数据·vscode·后端·大模型·scala·ai编程·cursor
wangqianqjl11 天前
vscode连接不上服务器问题修复
服务器·ide·vscode
扬帆丶起航11 天前
vscode内嵌浏览器实时预览vue项目
javascript·vue.js·vscode