mac latex vscode 配置

mac latex vscode 配置

安装mactex.pkg 这里有个快速下载的镜像 https://mirrors.aliyun.com/CTAN/systems/mac/mactex/

可以检查是否将 PATH 写入

复制代码
export PATH="/Library/TeX/texbin:$PATH"

vscode 下载插件 Latex Workshop

在配置文件 settings.json 中输入如下的配置

json 复制代码
    "latex-workshop.latex.tools": [
    {
        "name": "xelatex",
        "command": "/Library/TeX/texbin/xelatex",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOCFILE%"
        ]
    },
    {
        "name": "pdflatex",
        "command": "/Library/TeX/texbin/pdflatex",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOCFILE%"
        ]
    },
    {
        "name": "latexmk",
        "command": "/Library/TeX/texbin/latexmk",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "-outdir=%OUTDIR%",
            "%DOCFILE%"
        ]
    },
    {
        "name": "biber",  // Use Biber instead of BibTeX for BibLaTeX
        "command": "/Library/TeX/texbin/biber",
        "args": [
            "%DOCFILE%"
        ]
    }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "XeLaTeX",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "PDFLaTeX",
            "tools": [
                "pdflatex"
            ]
        },
        {
            "name": "Biber",  // New recipe to run Biber
            "tools": [
                "biber"
            ]
        },
        {
            "name": "LaTeXmk",
            "tools": [
                "latexmk"
            ]
        },
        {
            "name": "xelatex -> biber -> xelatex*2",  // Adjusted to use Biber
            "tools": [
                "xelatex",
                "biber",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "pdflatex -> biber -> pdflatex*2",  // Adjusted to use Biber
            "tools": [
                "pdflatex",
                "biber",
                "pdflatex",
                "pdflatex"
            ]
        }
    ],
    "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.latex.recipe.default": "lastUsed",
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    "editor.unicodeHighlight.allowedLocales": {
        "zh-hans": true,
        "zh-hant": true
    },
    "[latex]": {
        "editor.defaultFormatter": "James-Yu.latex-workshop"
    },
    "latex-workshop.latex.rootFile.indicator": "\\begin{document}"
相关推荐
到底起什么网名才能不重名4 小时前
使用各种CSS美化网页
前端·css·vscode·bootstrap·html
小弟调调5 小时前
Vidwall: 支持将 4K 视频设置为动态桌面壁纸,兼容 MP4 和 MOV 格式
macos·swiftui·桌面应用·macos app
Digitally9 小时前
如何将iPhone备份到Mac/MacBook
macos·ios·iphone
不知所云,12 小时前
3. lvgl 9.3 vscode 模拟环境搭建 lv_port_pc_vscode-release-v9.3
ide·vscode·编辑器·c·sdl·lvgl vscode·lvgl模拟器
墨小傲13 小时前
基于Linux下的vscode c/c++开发环境搭建详细教程
linux·c语言·vscode
Percep_gan14 小时前
idea的使用小技巧,个人向
java·ide·intellij-idea
tan180°1 天前
MySQL表的操作(3)
linux·数据库·c++·vscode·后端·mysql
万千思绪1 天前
【PyCharm 2025.1.2配置debug】
ide·python·pycharm
我在看世界1 天前
家里vscode连公司内网vscede
vscode·ssh
不想迷路的小男孩1 天前
Android Studio 中Palette跟Component Tree面板消失怎么恢复正常
android·ide·android studio