其他分享
首页 > 其他分享> > vscode_latex配置

vscode_latex配置

作者:互联网

vscode是一款强大的文本编辑器, 现在手头上所有的工作都离不开它了, 因为本人也经常使用latex, 遂记录下配置vscode使用latex的方式.

1. 首先, 要有texlive及vscode, 这个具体不谈, 下载安装

2. 其次, 在vscode中安装下列两个拓展:
    a.latex workshop 8.7.2
    b.latex language support 3.1.0

3. 在vscode的settings.json中增加如下配置: (放在字典中作为一项即可)

      "latex-workshop.latex.recipes": [{
        "name": "xelatex",
        "tools": [
            "xelatex"
        ]
      }, {
        "name": "latexmk",
        "tools": [
            "latexmk"
        ]
      },
      
      {
        "name": "pdflatex -> bibtex -> pdflatex*2",
        "tools": [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
        ]
      }
      ],
      "latex-workshop.latex.tools": [{
      "name": "latexmk",
      "command": "latexmk",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "-pdf",
        "%DOC%"
      ]
      }, {
      "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": "bibtex",
      "command": "bibtex",
      "args": [
        "%DOCFILE%"
      ]
      }],
      "latex-workshop.view.pdf.viewer": "tab",
      "latex-workshop.latex.clean.fileTypes": [
      "*.aux",
      "*.bbl",
      "*.blg",
      "*.idx",
      "*.ind",
      "*.lof",
      "*.lot",
      "*.out",
      "*.toc",
      "*.acn",
      "*.acr",
      "*.alg",
      "*.glg",
      "*.glo",
      "*.gls",
      "*.ist",
      "*.fls",
      "*.log",
      "*.fdb_latexmk"
      ], 

  

4. 重启vscode, 完成配置, 开始愉快地使用吧

标签:latex,pdflatex,name,vscode,配置,latexmk,workshop
来源: https://www.cnblogs.com/muhanxiaoquan/p/12457390.html