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}"
相关推荐
SoraLuna1 小时前
「Mac畅玩AIGC与多模态41」开发篇36 - 用 ArkTS 构建聚合搜索前端页面
前端·macos·aigc
习明然1 小时前
Visual Studio2022跨平台Avalonia开发搭建
ide·visual studio
有梦想的攻城狮2 小时前
mac本地docker镜像上传指定虚拟机
macos·docker·eureka
獨枭2 小时前
Visual Studio 2022 跨网络远程调试
网络·ide·visual studio
政沅同学3 小时前
QT+Visual Studio 配置开发环境教程
ide·visual studio
深井冰水4 小时前
Pycharm的终端执行allure命令出现command not found
macos·pycharm·接口自动化
测试者家园4 小时前
用 VS Code / PyCharm 编写你的第一个 Python 程序
ide·vscode·python·职场和发展·零基础·pycharm·零基础学python
张扬飞舞5 小时前
IntelliJ IDEA克隆项目失败的解决方法
java·ide·intellij-idea
DpHard6 小时前
Vscode 配置python调试环境
ide·vscode·python