LaTex在vscode的相关配置笔记

LaTex在vscode的相关配置笔记

    • 1. 下载配置 LaTex 相关环境文件
    • 2. 下载相关 vscode 插件
    • 3. 相关配置文件

1. 下载配置 LaTex 相关环境文件

  • 下载相关安装包
    官方镜像链接
    LaTex在vscode的相关配置笔记_第1张图片
    清华镜像链接
    LaTex在vscode的相关配置笔记_第2张图片

  • 双击install-tl-windows进行安装
    并选择相关安装路径
    LaTex在vscode的相关配置笔记_第3张图片
    安装完成后,按win + R,输入cmd打开命令行,输入 latex -v验证安装是否完成。

2. 下载相关 vscode 插件

LaTex在vscode的相关配置笔记_第4张图片


3. 相关配置文件

Ctrl + Shift + T 搜索json,打开用户设置(JSON)进行添加配置,如下图所示。
LaTex在vscode的相关配置笔记_第5张图片
将下列相关配置复制进json文件

{
    // Start LaTex Config
    // 编译方案配置
    "latex-workshop.latex.recipes": [{
        "name": "xelatex",
        "tools": [
            "xelatex"
        ]
      }, {
        "name": "latexmk",
        "tools": [
            "latexmk"
        ]
      },
      
      {
        "name": "pdflatex -> bibtex -> pdflatex*2",
        "tools": [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
        ]
      },
    
      {
          "name": "xe->bib->xe->xe",
     "tools": [
              "xelatex",
              "bibtex",
              "xelatex",
              "xelatex"
        ]
      }
      ],
      // 编译工具配置
      "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.latex.clean.fileTypes": [
      "*.aux",
      "*.bbl",
      "*.blg",
      "*.idx",
      "*.ind",
      "*.lof",
      "*.lot",
      "*.out",
      "*.toc",
      "*.acn",
      "*.acr",
      "*.alg",
      "*.glg",
      "*.glo",
      "*.gls",
      "*.ist",
      "*.fls",
      "*.log",
      "*.fdb_latexmk"
      ],

      "latex-workshop.latex.autoBuild.run": "onFileChange",  //保存时自动编译,不想自动编译 never
      "latex-workshop.message.error.show": false,   //隐藏在编译出现错误或者警告时自动弹出的提示窗口
      "latex-workshop.message.warning.show": false,

      "latex-workshop.latex.autoClean.run": "onFailed",
      "latex-workshop.latex.recipe.default": "lastUsed",
      
      "latex-workshop.synctex.afterBuild.enabled": true,
      "latex-workshop.view.pdf.internal.synctex.keybinding": "ctrl-click",  //使用 Alt+Ctrl+J 正向搜索,使用 Ctrl+单击PDF 反向搜索
      
      "latex-workshop.view.pdf.viewer": "tab",  //使用内置的PDF阅读器查看
      "latex-workshop.showContextMenu":true,    //右键菜单
      "latex-workshop.intellisense.package.enabled": true,  //从使用的包中自动补全命令和环境


    // End LaTex Config
}

你可能感兴趣的:(VSCode的使用,vscode,json,ide)