Vscode搭配latex简易教程

1. 找镜像网站下载texlive的iso文件

清华源镜像

下载之后直接打开iso文件,打开install-tl-windows.bat文件,进行安装即可,安装大概30分钟左右

2. VScode端配置

2.1 下载这三个插件

2.2 打开设置

2.3 追加内容到配置json文件当中

json 复制代码
  // Latex configuration
  "latex-workshop.latex.recipes": [
    {
      "name": "xe->bib->xe->xe",
      "tools": [
        "xelatex",
        "bibtex",
        "xelatex",
        "xelatex"
      ]
    }
  ],
  "latex-workshop.latex.tools": [
    {
      // 编译工具和命令
      "name": "xelatex",
      "command": "xelatex",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        // "-pdf",
        "%DOCFILE%"
      ]
    },
    {
      "name": "pdflatex",
      "command": "pdflatex",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "%DOCFILE%"
      ]
    },
    {
      "name": "bibtex",
      "command": "bibtex",
      "args": [
        "%DOCFILE%"
      ]
    }
  ],
  "latex-workshop.view.pdf.viewer": "tab",
  "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"
  ]

2.4 重启VScode即可

右上角书本加一个放大镜的标识就是查看编译好的pdf文件

相关推荐
刘恒12345678912 小时前
VSCODE
vscode
code bean15 小时前
Visual Studio 2026 离线安装包制作指南
ide·visual studio
你怎么知道我是队长18 小时前
VsCode插件推荐---Todo Tree
ide·vscode·编辑器
becatjd19 小时前
VScode的claude code插件报错command ‘claude-vscode.editor.openLast‘ not found
ide·vscode·编辑器·claude·anthropic·claude code
BIBI204919 小时前
下载指定历史版本 VSCode 或 VSCode Insider
ide·vscode·编辑器
优秀是不可能的20 小时前
Claude Code VSCode 扩展 Windows 打开出现 “claude-vscode.editor.openLast”
ide·windows·vscode·claude code
ouliten21 小时前
VSCode的C++插件clangd如何搭配cuda使用?
c++·ide·vscode
johnny2331 天前
编辑器和笔记软件汇总:Typst、Reminds、Memos、Editor、MDX Notes、Jotty
笔记·编辑器
宫瑾1 天前
vscode未定义标识符报错的解决方法
ide·vscode·编辑器
lonelyhiker1 天前
新版idea的structure卡顿
java·ide·intellij-idea