{//在上述软件/插件安装之后,你需要把TeX Live 的 bin 目录(C:\ProgramFiles\texlive\2019\bin\win32)添加到系统环境变量(PATH)中,如果你下载了Sumtra,还需要添加它的路径(C:\Program Files\SumatraPDF)【这是默认路径,如果你修改了路径则填入修改后的】,Win10 中将路径添加到环境变量中的步骤如下:右键我的电脑,然后选择 属性,在左侧选择 高级系统设置,然后选择下方的 环境变量,选择变量 Path 编辑,将需要添加的路径添加进去即可。
// 中文文献开头是 \documentclass[UTF8]{ctexart},
// 设置预览方式
"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.ref.viewer": "external",
// 设置外部PDF预览器
"latex-workshop.view.pdf.external.viewer.command": "D:/SumatraPDF/SumatraPDF.exe",//地址换自己文件所在的目标地址
"latex-workshop.view.pdf.external.viewer.args": ["%PDF%"],
// 配置Syntex的正向搜索(Latex->PDF)
"latex-workshop.view.pdf.external.synctex.command": "D:/SumatraPDF/SumatraPDF.exe",//地址换自己文件所在的目标地址
"latex-workshop.view.pdf.external.synctex.args": [
"-forward-search",
"%TEX%",
"%LINE%",
"-reuse-instance",
"-inverse-search",
"D:/VScode/Microsoft VS Code/Code.exe D:/VScode/Microsoft VS Code/resources/app/out/cli.js -r -g %f:%l",
"%PDF%" //地址换自己文件所在的目标地址
],
"latex-workshop.showContextMenu": true, //右键菜单
"latex-workshop.intellisense.package.enabled": true, //根据加载的包,自动完成命令或包
"latex-workshop.latex.autoBuild.run": "never", //禁止保存文件时自动build
"latex-workshop.latex.recipes": [
{
"name": "PDFLaTeX",
"tools": ["pdflatex"]
},
{
"name": "PDFLaTeX with Shell Escape",
"tools": ["pdflatex-with-shell-escape"]
},
{
"name": "XeLaTeX",
"tools": ["xelatex"]
},
{
"name": "XeLaTeX with Shell Escape",
"tools": ["xelatex-with-shell-escape"]
},
{
"name": "pdflatex -> bibtex -> pdflatex*2",
"tools": ["pdflatex", "bibtex", "pdflatex", "pdflatex"]
},
{
"name": "xelatex -> bibtex -> xelatex*2",
"tools": ["xelatex", "bibtex", "xelatex", "xelatex"]
},
{
"name": "LaTeXmk",
"tools": ["latexmk"]
},
{
"name": "BibTeX",
"tools": ["bibtex"]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOCFILE%"
],
"env": {}
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
],
"env": {}
},
{
"name": "pdflatex-with-shell-escape",
"command": "pdflatex",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
],
"env": {}
},
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
],
"env": {}
},
{
"name": "xelatex-with-shell-escape",
"command": "xelatex",
"args": [
"--shell-escape",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
],
"env": {}
},
{
"name": "bibtex",
"command": "bibtex",
"args": ["%DOCFILE%"],
"env": {}
}
],
"latex-workshop.latex.clean.fileTypes": [
//设定清理文件的类型(ctrl+alt+c:清除辅助文件)
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk",
"*.nav",
"*.snm",
"*.synctex.gz",
"*.bcf",
"*.run.xml"
],
}