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文件

相关推荐
zh_xuan14 小时前
解决VS Code 控制台中文乱码
c++·vscode·乱码
周末也要写八哥14 小时前
Eclipse 2024全流程网盘下载与安装配置教程详解
java·ide·eclipse
猿儿本无心15 小时前
快速搭建Python项目(Vscode+uv+FastAPI)
vscode·python·uv
ChampaignWolf18 小时前
在 Eclipse 中使用 Tabnine
java·ide·eclipse
π同学19 小时前
ESP-IDF+vscode开发ESP32第十二讲——event
vscode·esp32·事件循环库event
诗水人间20 小时前
VsCode 中使用Copilot调用Deepseek V4模型
ide·vscode·copilot
梦想家加一20 小时前
vscode为什么下载了汉化插件却不生效
ide·vscode·编辑器
大熊猫侯佩21 小时前
升级到 macOS26.5 后看视频会自动息屏的解决
macos·操作系统
NiceCloud喜云1 天前
Claude API 流式输出(SSE)实战:从打字机效果到工具调用全流程
java·前端·ide·人工智能·chrome·intellij-idea·状态模式
多云的夏天1 天前
IDE-VSCODE-Continue + DeepSeek V4
ide·vscode·编辑器·deepseek