latex vscode 配置参考

Posted 霜序0.2℃

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了latex vscode 配置参考相关的知识,希望对你有一定的参考价值。

我觉得这个博客写的不错VSCode配置LaTeX最详细版,加上wiki文档足够了

// --- Latex 配置 ---
    // 为构建而运行的工具序列
    "latex-workshop.latex.recipes": [
        
            "name": "pdflatex",
            "tools": [
                "pdflatex"
            ]
        ,
        
            "name": "xelatex",
            "tools": [
                "xelatex"
            ]
        ,
        
            "name": "lualatex",
            "tools": [
                "lualatex"
            ]
        ,
        
            "name": "bibTeX",
            "tools": [
                "bibtex"
            ]
        ,
        
            "name": "xelatex -> bibtex -> xelatex*2",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        ,
        
            "name": "pdflatex -> bibtex -> pdflatex*2",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        
    ],
    // 可用于构建的工具
    "latex-workshop.latex.tools": [
        
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        ,
        
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        ,
        
            "name": "lualatex",
            "command": "lualatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        ,
        
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        
    ],
    // 保存文件后构建项目
    "latex-workshop.latex.autoBuild.run": "onSave",
    // 两次连续自动构建之间的最小时间间隔(以毫秒为单位)
    "latex-workshop.latex.autoBuild.interval": 1000,
    // 从加载的包中启用命令和环境的自动完成(默认也是true)
    "latex-workshop.intellisense.package.enabled": true,
    // 默认的 PDF 查看器 external代表使用外部PDF查看器
    "latex-workshop.view.pdf.viewer": "external",
    // 使用外部查看器时执行的命令,即外部软件的位置 字符串
    "latex-workshop.view.pdf.external.viewer.command": "C:/Users/windows/AppData/Local/SumatraPDF/SumatraPDF.exe",
    // 提供给上述命令的参数 数组
    "latex-workshop.view.pdf.external.viewer.args": [
        "-forward-search",
        "%TEX%",
        "%LINE%",
        "-reuse-instance",
        "-inverse-search",
        "\\"C:/Users/windows/AppData/Local/Programs/Microsoft VS Code/Code.exe\\" \\"C:/Users/windows/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js\\" -gr \\"%f\\":\\"%l\\"",
        "%PDF%"
    ],
    // 用于外部查看器的 SyncTeX 命令 字符串
    "latex-workshop.view.pdf.external.synctex.command": "C:/Users/windows/AppData/Local/SumatraPDF/SumatraPDF.exe",
    // 用于上述命令的参数 数组
    "latex-workshop.view.pdf.external.synctex.args": [
        "-forward-search",
        "%TEX%",
        "%LINE%",
        "-reuse-instance",
        "-inverse-search",
        "code \\"C:/Program Files/SelfSoftware/Microsoft VS Code/resources/app/out/cli.js\\" -gr \\"%f\\":\\"%l\\"",
        "%PDF%",
    ],
    // LaTeX 编译通常会生成几个辅助文件,相关:latex-workshop.clean
    // 要清理的文件扩展名 字符串数组
    "latex-workshop.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist", // 默认中没有出现
        "*.fls",
        "*.log", // 默认中没有出现
        "*.nav",
        "*.snm",
        "*.vrb", // 默认中没有出现
        "*.fdb_latexmk",
        "*.synctex(busy)", // 默认中出现但是其他博客的配置没有出现
        "*.synctex.gz(busy)" // 同上
    ],
    "explorer.confirmDelete": false,
    // --- Latex 配置 END ---

以上是关于latex vscode 配置参考的主要内容,如果未能解决你的问题,请参考以下文章

VSCode下配置Latex (TexLive)

Vscode+LatexMac 系统Vscode的LaTeX中插入参考文献

Vscode+LatexMac 系统Vscode的LaTeX中插入参考文献

MAC+VSCode+Latex 配置Latex编写环境

VSCode配置LaTeX Workstation以支持中文

VScode 配置为 LaTeX IDE