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}"
相关推荐
2501_928094653 小时前
Mac电脑录屏工具 Omi录屏专家(Mac中文)
macos·mac·录屏工具·omi
阿波罗尼亚3 小时前
@Autowired @Resource IDE警告 和 依赖注入
ide
Hyvial6 小时前
VsCode 使用指南(配置 + 美化)
vscode
森之鸟6 小时前
Mac chrome浏览器下载DevEco Studio 6.0.0 Beta2失败
前端·chrome·macos
坠金7 小时前
不同ide回到上一个文件快捷键
ide
十秒耿直拆包选手7 小时前
IDE:vscode的vue3模板
javascript·ide·vscode
Wallace Zhang7 小时前
STM32 - Embedded IDE - GCC - 解决LWRB库在GCC编译器会编译失败,在ARMCC编译器时却正常编译
ide·stm32·嵌入式硬件
FairGuard手游加固14 小时前
版本更新!FairGuard-Mac加固工具已上线!
macos
QL.ql19 小时前
vscode的wsl环境,ESP32驱动0.96寸oled屏幕
ide·vscode·编辑器