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

相关推荐
CONTONUE5 小时前
如何调整yarn.nodemanager.vmem-pmem-ratio参数?
ide·eclipse
Taichi呀5 小时前
PyCharm 快捷键指南
ide·python·pycharm
AI视觉网奇7 小时前
vscode 默认环境路径
ide·vscode·编辑器
Eloudy8 小时前
MacOS 上构建 gem5
linux·运维·macos
慢一点会很快8 小时前
【Tools】VScode远程调试linux服务器(打断点可视化界面方式)
linux·服务器·vscode
王光环10 小时前
vscode与keil的乱码不兼容问题
ide·vscode·编辑器
萑澈10 小时前
迁移 Visual Studio Code 设置和扩展到 VSCodium
ide·vscode·编辑器
深井冰水12 小时前
mac M2下虚拟机CentOS 8 安装上安装 Berkeley DB
数据库·macos·centos
胡斌附体13 小时前
idea查看pom文件依赖
java·ide·intellij-idea·maven依赖
liulilittle13 小时前
MAC-OS X 命令行设置IP、掩码、网关、DNS服务器地址
linux·网络·macos