在清华镜像站下载,texlive2020.iso
大小为3.7G,比较大,下载比较费时间。路径如下:
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/
下载结束后点击该镜像,其文件组织方式大致如下:
双击install-tl-windows.bat
批处理文件,然后点击Advanced
:
然后修改安装路径,防止占用C盘空间,如下:
其余选项不用更改,也可以把右下角的“After install, set CTAN as source for package updates”勾选去掉。
然后点击安装即可。安装时间会比较久,大约1h。当得到欢迎进入TeX Live的世界
后表明安装成功,退出即可。此时安装用到的iso文件可以删除。
在VS Code中直接搜索并安装该插件,或者在https://marketplace.visualstudio.com/search?target=VSCode&category=All%20categories&sortBy=Installs搜索该插件下载后通过VSIX方式选择下载的插件安装,如下:
插件安装好后点击Ctrl+Shift+P
并搜索setting
,打开setting.json
,如下:
在其中添加如下内容:
"latex-workshop.view.pdf.viewer": "tab",
"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.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"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格式化的插件latex-formatter
,也可以安装使用。