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 天前
在 Apple 芯片的 Mac 上通过 VMware Fusion 使用 Windows 11
windows·macos·vmware·虚拟机
菜哥万岁万岁万万岁1 天前
Visual Studio 2022 社区版下载
ide·visual studio
iCxhust2 天前
8088单板机VScode集成开发环境使用方法
ide·笔记·vscode·编辑器·微机原理·8088单板机
c&0xff002 天前
mac通过网线连接树莓派
macos
如何原谅奋力过但无声2 天前
现代化Python工具:uv、Ruff、Pyright、Rich(只讲重点版)
vscode·python·uv
来日方长。。。。long2 天前
Hermes Agent橙皮书共读|第三篇:保姆级实战部署|本地/VPS从零搭建Hermes
ide·git·hermes
Molesidy2 天前
【VSCode】基于win10系统老版本和VSCode最新版本下出现的VSCode内置的终端窗口不能运行的问题的解决方案
ide·vscode·编辑器
孙启超2 天前
Token太贵自己写了一个mac版开源AI编程工具
人工智能·macos·开源·llm·agent·ai编程·ai应用开发
维度攻城狮2 天前
PyCharm 使用 DevContainer 开发:打造一致、隔离、高效的开发环境
ide·python·pycharm·devcontainer
2601_965798472 天前
Launch Your Wellness App Fast: The Truth About Meditation Source Code
前端·macos·ios·objective-c·cocoa