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

在这里插入图片描述

相关推荐

  1. VSCode配置Python教程

    2024-04-22 07:32:06       23 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-22 07:32:06       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-22 07:32:06       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-22 07:32:06       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-22 07:32:06       18 阅读

热门阅读

  1. Golang函数重试机制实现

    2024-04-22 07:32:06       14 阅读
  2. Deepin中安装Golang1.22

    2024-04-22 07:32:06       11 阅读
  3. 使用idea如何打开python项目

    2024-04-22 07:32:06       14 阅读
  4. 【LeetCode热题100】【子串】最小覆盖子串

    2024-04-22 07:32:06       11 阅读
  5. FFMPEG C++封装(三)

    2024-04-22 07:32:06       13 阅读
  6. Delete the specified node in the linked list with dummy header

    2024-04-22 07:32:06       11 阅读
  7. mac tcp实现客户端与服务端进行图像传输及处理

    2024-04-22 07:32:06       12 阅读
  8. 【Linux】学习记录_15_POSIX信号量

    2024-04-22 07:32:06       12 阅读
  9. 如何在 Apache 和 Nginx 上配置 OCSP Stapling

    2024-04-22 07:32:06       13 阅读
  10. 【Qt】Qt中多线程的使用

    2024-04-22 07:32:06       12 阅读
  11. 使用 ADB 命令在 Android 设备上进行截屏

    2024-04-22 07:32:06       11 阅读
  12. 深入探索 Apache Flink:流式处理框架的奥秘

    2024-04-22 07:32:06       13 阅读