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文件

相关推荐
qiqiqi(^_×)8 小时前
卡在“pycharm正在创建帮助程序目录”
ide·python·pycharm
小妖6669 小时前
vscode 源码编译
ide·vscode·编辑器
张人玉10 小时前
Visual Studio 的常用快捷键
ide·visual studio
focksorCr12 小时前
在VsCode上使用开发容器devcontainer
ide·vscode·编辑器
Lum110412 小时前
PyCharm高效入门指南大纲
ide·python·pycharm
郭尘帅66616 小时前
IDEA中删除多余的jdk选项 【IDEA2024版】
java·ide·intellij-idea
慌糖16 小时前
IDEA报错“资源找不到”?重启就好了!!?
java·ide·intellij-idea
荔枝吻16 小时前
【保姆级喂饭教程】idea开发TODO规范
java·ide·intellij-idea
荔枝吻16 小时前
【保姆级喂饭教程】Idea中配置类注释模板
java·ide·intellij-idea
Marst Code17 小时前
PyCharm(入门篇)
ide·python·pycharm