Mac m1 vscode 配置latex 详细教程

1、LaTeX官网下载MacTex

https://www.tug.org/mactex/mactex-download.html

2、VScode安装插件

  • LaTeX language support
  • LaTeX Workshop

3、MacTeX和插件安装完成后,在VScode点击设置,找到settings.json文件,在文件配置中加入:

复制代码
"latex-workshop.latex.tools": [
        {
          "name": "xelatex",
          "command": "xelatex",
          "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOC%"
          ]
        },
        {
          "name": "pdflatex",
          "command": "pdflatex",
          "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOC%"
          ]
        },
        {
          "name": "latexmk",
          "command": "latexmk",
          "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "%DOC%"
          ]
        },
        {
          "name": "bibtex",
          "command": "bibtex",
          "args": [
            "%DOCFILE%"
          ]
        }
      ],
 
      "latex-workshop.latex.recipes": [
        {
          "name": "XeLaTeX",
          "tools": [
            "xelatex"
          ]
        },
        {
          "name": "PDFLaTeX",
          "tools": [
            "pdflatex"
          ]
        },
        {
          "name": "latexmk",
          "tools": [
            "latexmk"
          ]
        },
        {
          "name": "BibTeX",
          "tools": [
            "bibtex"
          ]
        },
        {
          "name": "xelatex -> bibtex -> xelatex*2",
          "tools": [
            "xelatex",
            "bibtex",
            "xelatex",
            "xelatex"
          ]
        },
        {
          "name": "pdflatex -> bibtex -> pdflatex*2",
          "tools": [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
          ]
        },
    ],

文件中的其余配置不做修改。

4、测试:运行一个.tex文件,点击运行即可

5、可以同步查看对应的pdf文件

相关推荐
小锋学长生活大爆炸13 小时前
【开源软件】打造 macOS 纯本地 LLM 工作台 | Sidekick
macos·llm
bleuesprit13 小时前
MAC 电脑快速打开claude code 终端
macos
啾啾啾66613 小时前
VScode用cookie登录时,输入cookie值后按回车没反应
ide·vscode·编辑器
雨声不在14 小时前
mac-intel安装git-lfs
git·elasticsearch·macos
iwS2o90XT14 小时前
开发一个VS Code主题插件,定制你的IDE
ide·jupyter·postman
yc_12241 天前
用 Visual Studio 远程调试 Linux:从零到流畅的完整指南
linux·ide·visual studio
NQBJT1 天前
VS Code配置Python人工智能开发环境
开发语言·人工智能·vscode·python
π同学1 天前
ESP-IDF+vscode开发ESP32第十讲——I2S工程2
vscode·esp32·sd·音频播放
望眼欲穿的程序猿1 天前
苹果系统使用VsCode开发QT
ide·vscode·编辑器
Cho1yon1 天前
【第15期:车机CarPlay使用中语音唤醒失效问题分析与解决方案】
macos·车载系统·objective-c·cocoa