安装Tex Live并配置使用VScode

下载Tex Live

可以使用清华源镜像加速下载:

https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/

下载最新版本即可:

image-20220829133732194

安装

解压下载后的文件,注意这里需要新建一个文件夹,并将压缩包放入其中

image-20220829134721910

管理员身份运行安装脚本:

image-20220829134855284

脚本会打开gui进行安装步骤,选择安装的路径

image-20220829135227879

点击安装,等待安装成功即可:

image-20220829135335204

win+R输入cmd打开控制台,输入tex -v,当出现版本号时,表示安装成功:

image-20220829155917798

配置

这里使用VScode作为Latex的编辑器

必须安装的插件:

  • LaTeX Workshop

    image-20220910085707365

相关配置如下,具体操作为:

  1. 打开设置

    image-20220910100423912

  2. 点击右上角图标打开配置文件,将下面的配置粘贴到配置文件中(如果之前修改过配置,配置文件会存在已有的配置,粘贴在下方即可)

    image-20220910100652743

    "latex-workshop.latex.autoBuild.run": "never",
        "latex-workshop.showContextMenu": true,
        "latex-workshop.intellisense.package.enabled": true,
        "latex-workshop.message.error.show": false,
        "latex-workshop.message.warning.show": false,
        "latex-workshop.latex.tools": [
            {
                "name": "xelatex",
                "command": "xelatex",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "%DOCFILE%"
                ]
            },
            {
                "name": "pdflatex",
                "command": "pdflatex",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "%DOCFILE%"
                ]
            },
            {
                "name": "latexmk",
                "command": "latexmk",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "-pdf",
                    "-outdir=%OUTDIR%",
                    "%DOCFILE%"
                ]
            },
            {
                "name": "bibtex",
                "command": "bibtex",
                "args": [
                    "%DOCFILE%"
                ]
            }
        ],
        "latex-workshop.latex.recipes": [
            // {
            //     "name": "XeLaTeX",
            //     "tools": [
            //         "xelatex"
            //     ]
            // },
            // {
            //     "name": "PDFLaTeX",
            //     "tools": [
            //         "pdflatex"
            //     ]
            // },
            // {
            //     "name": "BibTeX",
            //     "tools": [
            //         "bibtex"
            //     ]
            // },
            // {
            //     "name": "LaTeXmk",
            //     "tools": [
            //         "latexmk"
            //     ]
            // },
            // {
            //     "name": "xelatex -> bibtex -> xelatex*2",
            //     "tools": [
            //         "xelatex",
            //         "bibtex",
            //         "xelatex",
            //         "xelatex"
            //     ]
            // },
            {
                "name": "pdflatex -> bibtex -> pdflatex*2",
                "tools": [
                    "pdflatex",
                    "bibtex",
                    "pdflatex",
                    "pdflatex"
                ]
            },
        ],
        "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.autoClean.run": "onFailed",
        "latex-workshop.latex.recipe.default": "lastUsed",
        "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click"
    

一些好用的插件(持续更新)

posted @ 2022-09-11 15:56  骇人的籽  阅读(203)  评论(0编辑  收藏  举报