Mac m1 vscode 配置latex 详细教程

36秒前 6阅读

1、LaTeX官网下载MacTex

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

Mac m1 vscode 配置latex 详细教程

2、VScode安装插件

  • LaTeX language support
  • LaTeX Workshop

    Mac m1 vscode 配置latex 详细教程

    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"
              ]
            },
        ],
    

    Mac m1 vscode 配置latex 详细教程

    Mac m1 vscode 配置latex 详细教程

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

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

    Mac m1 vscode 配置latex 详细教程

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

    Mac m1 vscode 配置latex 详细教程

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]