1、处理模板里的reference.bib文件
2、使用reference.bib文件
3、添加引用
4、配置编译器,否则编译会报错。在该目录填写如下代码:
{"latex-workshop.latex.outDir": "%DIR%/.build","latex-workshop.view.pdf.viewer": "tab","latex-workshop.bibtex-format.tab": "tab", // bibtex 格式"latex-workshop.latex.tools": [{// 编译工具和命令"name": "xelatex","command": "xelatex","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","--shell-escape","--output-directory=%OUTDIR%","%DOCFILE%"]},{"name": "pdflatex","command": "pdflatex","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","--output-directory=%OUTDIR%","%DOCFILE%"],},{"name": "bibtex","command": "bibtex","args": ["%OUTDIR%/%DOCFILE%"],"env": {"TEXMFOUTPUT": "%OUTDIR%",}},{"name": "biber","command": "biber","args": ["--output-directory=%OUTDIR%","%DOCFILE%"],"env": {"TEXMFOUTPUT": "%OUTDIR%",}}],"latex-workshop.latex.recipes": [{"name": "xelatex","tools": ["xelatex"]},{"name": "pdflatex","tools": ["pdflatex"]},{"name": "xe->bib->xe->xe","tools": ["xelatex","biber","xelatex","xelatex"]},{"name": "pdf->bib->pdf->pdf","tools": ["pdflatex","biber","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",],
}
5、按照步骤操作即可,否则会报如下错误: