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

相关推荐
Leon Cheng10 小时前
Vue3 + Monaco Editor 实现智能变量编辑器:隐藏花括号的魔法
编辑器
你知道“铁甲小宝”吗丶10 小时前
VSCode使用Claude Code
vscode·ai·ai编程
浪潮IT馆11 小时前
在 VSCode 中调试 JavaScript 的 Jest 测试用例
javascript·ide·vscode
椰汁菠萝12 小时前
VSCode中properties文件读写
ide·vscode·properties
weixin_5500831513 小时前
QTdesigner配置在pycharm里使用anaconda环境配置安装成功
ide·python·pycharm
dvlinker14 小时前
C/C++编程开发工具及实用软件推荐
ide·vscode·visual studio·qt creator·c/c++·source insight·编程工具
Kazefuku15 小时前
VS Code 和Visual Studio:简单易懂的区别
ide·windows·visual studio
gsgbgxp15 小时前
通过tailscale配置ssh远程实现wsl系统VSCode编程
vscode·深度学习·ubuntu·ssh
Boxsc_midnight15 小时前
【一款支持Ollama本地部署的Visual Studio 2022 编程助手插件的编译和生成之路】解决打包安装问题
ide·visual studio·vs插件
-凌凌漆-15 小时前
vscode运行npm报错,npm : 无法加载文件 xxxxx/npm.ps1,因为在此系统上禁止运行脚本。
ide·vscode·npm