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",
相关推荐
要加油哦~12 小时前
工具 | 解决 VSCode 中的 Delete CR 问题
ide·vscode·编辑器
taoismimortal1 天前
vscode目录,右键菜单加入用VSCode打开文件和文件夹(快速解决)(含删除)(脚本)
ide·vscode·编辑器
猫咪的白手套1 天前
解决VSCode中“#include错误,请更新includePath“问题
ide·vscode·编辑器
天安彩1 天前
mac下 vscode 运行 c++无法弹出窗口
c++·vscode·macos·clang
nlp研究牲1 天前
latex中既控制列内容位置又控制列宽,使用>{\centering\arraybackslash}p{0.85cm}
服务器·前端·人工智能·算法·latex
白日与明月1 天前
Hive-vscode-snippets
hive·hadoop·vscode
橘子味的茶二1 天前
vsCode如何远程服务器不需要每次输入密码
服务器·ide·vscode
William.csj2 天前
VSCode——python选择解释器消失的解决办法
vscode·编辑器
滴水成川2 天前
现代 C++ 开发工作流(VSCode / Cursor)
开发语言·c++·vscode·cursor
Eiceblue2 天前
PDF转Markdown - Python 实现方案与代码
开发语言·vscode·python·pdf