Ctrl + Shift + T 搜索json
,打开用户设置(JSON)进行添加配置,如下图所示。
将下列相关配置复制进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
}