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}"
相关推荐
携欢7 小时前
CodeQL(Mac)安装与测试(Visual Studio)简明指南
ide·vscode·macos
Android小码家9 小时前
Vscode + docker + qt 网络监听小工具
vscode·qt·docker
中国胖子风清扬9 小时前
Rust 序列化技术全解析:从基础到实战
开发语言·c++·spring boot·vscode·后端·中间件·rust
susu108301891114 小时前
如何选择文件夹然后用vscode直接打开
ide·vscode·编辑器
非得登录才能看吗?14 小时前
开发环境 之 编辑器、编译器、IDE梳理
ide·编辑器
明月(Alioo)15 小时前
机器学习入门,用Lima在macOS免费搭建Docker环境,彻底解决镜像与收费难题!
macos·docker·容器
小江村儿的文杰15 小时前
UE4 Mac构建编译报错 no template named “is_void_v” in namespace “std”
macos·ue4
艾莉丝努力练剑17 小时前
GCC编译器深度解剖:从源码到可执行文件的全面探索
c++·ide·经验分享·gcc
MonkeyKing_sunyuhua17 小时前
mac怎么安装uv工具
python·macos·uv
熊猫钓鱼>_>17 小时前
在VSCode中更新或安装最新版的npx和uv工具
ide·vscode·uv