首先进入镜像网站下载texLive
卸载方式(C:/texlive/2022/tlpkg/pkg/installer/uninst.bat管理员身份运行)
下载:运行驱动中的install-tl-windows.bat,可以修改安装位置,其他默认即可,解压时间比较长,管理员命令行xelatex判断是否成功安装,另外可以运行tlmgr option repository https://mirrors.tuna.tsinghua.edu.c n/CTAN/systems/texlive/tlnet来自动从镜像源更新包
建议设置一个外置的PDF阅读器,并且复制其exe路径(下面要用)
VsCode安装扩展latex workshop,控制台输入JSON设置打开设置(JSON),注意不是默认设置(只读),把下面的配置复制进去,对配置的路径有两个地方要修改:
- 修改外置PDF阅读器位置
- 修改vscode的js文件路径
最后就大功告成啦!!!
//==================== LaTeX 设置 BEGIN ========================
// bibtex 格式
"latex-workshop.bibtex-format.tab": "tab",
// 自动编译,全部关闭,当且仅当你认为有需要的时候才会去做编译
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.latex.autoBuild.cleanAndRetry.enabled": false,
// 设置 latex-workshop 的 PDF 预览程序,external 指的是外部程序
"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.ref.viewer": "external",
"latex-workshop.view.pdf.external.viewer.command": "D:/App/PDFEditor/PDFXEdit.exe",//改
"latex-workshop.view.pdf.external.viewer.args": [
"%PDF%"
],
// 配置正向、反向搜索:.tex -> .pdf
"latex-workshop.view.pdf.external.synctex.command": "D:/App/PDFEditor/PDFXEdit.exe",//改
"latex-workshop.view.pdf.external.synctex.args": [
// 正向搜索
"-forward-search",
"%TEX%",
"%LINE%",
"-reuse-instance",
// 反向搜索
"-inverse-search",
"\"D:/App/VS_Code1.66.1/Microsoft VS Code/Code.exe\" \"D:/App/VS_Code1.66.1/Microsoft VS Code/resources/app/out/cli.js\" -gr %f:%l",//改
"%PDF%"
],
// 这是一些独立的编译选项,可以作为工具被编译方案调用
"latex-workshop.latex.tools": [
{
// Windows 原生安装 TeX Live 2020 的编译选项
"name": "Windows XeLaTeX",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOCFILE%"
]
},
{
// Windows Biber 编译
"name": "Windows Biber",
"command": "biber",
"args": [
"%DOCFILE%"
]
},
{
// WSL XeLaTeX 编译一般的含有中文字符的文档
"name": "WSL XeLaTeX",
"command": "wsl",
"args": [
"/usr/local/texlive/2020/bin/x86_64-linux/xelatex",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
//"-output-directory=%OUTDIR%",
//"-aux-directory=%OUTDIR%",
"%DOCFILE%"
]
},
{
// WSL biber / bibtex 编译带有 citation 标记项目的文档
"name": "WSL Biber",
"command": "wsl",
标签:latex,VsCode,编译,workshop,external,pdf,texLive,view
From: https://www.cnblogs.com/comein/p/16729805.html