Mac下利用vscode配置latex

由于安装mactex默认的是pdftex,该解释器不支持中文所以需要xetex解释器

在settings.json的配置文件中需要加上下面这段代码配置文件

复制代码
{
   "editor.mouseWheelZoom": true,
 
    "latex-workshop.latex.tools": [
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "%DOCFILE%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "xelatex",
            "tools": [
                "xelatex"
            ],
        },
        {
            "name": "pdflatex",
            "tools": [
                "pdflatex"
            ]
        },
        {
            "name": "xe->bib->xe->xe",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "pdf->bib->pdf->pdf",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        }
    ],
}

该配置代码可以将pdftex转变为更为丰富的xetex。同时还有多种个性化配置

复制代码
{
    "workbench.colorTheme": "Default Light Modern"
    // 禁止自动编译
    "latex-workshop.latex.autoBuild.run": "never",
    // 编译后自动清理无用文件
    "latex-workshop.latex.autoClean.run": "onBuilt",
    "latex-workshop.latex.clean.subfolder.enabled": true,
    // 自动使用上一次的编译器
    "latex-workshop.latex.recipe.default": "lastUsed",
    // 根据使用的包自动补全
    "latex-workshop.intellisense.package.enabled": true,
    // 不弹窗显示错误和告警信息
    "latex-workshop.message.error.show": false,
    "latex-workshop.message.warning.show": false,
}

如有别的个性化配置会持续更新。

相关推荐
2501_915909064 天前
移动端开发工具链怎么组合比较好,iOS、Android、跨端三套配置方案
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
sunoo-2294 天前
【ARM嵌入式学习笔记Day6】一文打通i.MX6ULL时钟体系:PLL/PFD/预分频+滞回比较器全解析
arm开发·笔记·vscode·单片机·imx6ull·汇编语言
明天…ling4 天前
gitee与vscode远程连接
vscode·gitee
2501_915918414 天前
iOS编程用什么软件好?主流工具Xcode、AppCode、CodeRunner与新兴快蝎对比
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
__pop_5 天前
VSCode Remote SSH 远程连接 glibc 高版本依赖问题
vscode
daxiangxm5 天前
【趣味休息】“围住小猫在线玩”-“困住小猫”,又回来了
数据结构·人工智能·vscode·github·php
星光开发者5 天前
基于Spring Boot的充电桩管理系统的设计与实现-计算机毕设【课程设计】57105
vue.js·spring boot·vscode·mysql·django·php·express
程序员允诺5 天前
内网/无网环境必备:VS Code Remote-SSH 离线包下载与手动部署教程
vscode
黑化旺仔6 天前
【OC】KVO
macos·ios·objective-c·cocoa
滕州市燕猫虎计算机科技工作室个体工商户6 天前
IDEA:Command line is too long
java·ide·intellij-idea