LaTex + VScode安装

参考文章

本文参考知乎网友写的Latex教程
知乎:2020搭建Latex环境:Texlive+VScode

1 TeX Live 下载与安装 (清华镜像源)

TexLive清华源镜像
三个.iso文件选择任意一个即可
在这里插入图片描述
装载.iso文件后,用管理员身份打开windows批处理文件,进入安装。
在这里插入图片描述
一路确定,更改路劲(不建议放在系统盘C),并确保“修改注册表中的PATH设置”为【是】
开始安装,漫长等待…
在这里插入图片描述

VS code 下载与配置

附上官网下载网址
VScode 下载

配置

进入设置
在这里插入图片描述
进入.json配置
在这里插入图片描述
复制如下代码

{
    "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.latex.recipes": [
      {
   "name": "xelatex",
   "tools": [
   "xelatex"
          ],
      },
      {
   "name": "pdflatex",
   "tools": [
   "pdflatex"
          ]
      },
      {
   "name": "xe->bib->xe->xe",
   "tools": [
   "xelatex",
   "bibtex",
   "xelatex",
   "xelatex"
          ]
      },
      {
   "name": "pdf->bib->pdf->pdf",
   "tools": [
   "pdflatex",
   "bibtex",
   "pdflatex",
   "pdflatex"
          ]
      }
  ],
  "latex-workshop.view.pdf.viewer": "external",
   
  "latex-workshop.view.pdf.external.viewer.command": "C:/Program Files (x86)/Adobe/Acrobat DC/Acrobat/Acrobat.exe",
  "latex-workshop.view.pdf.external.viewer.args": [
   "-forward-search",
   "%TEX%",
   "%LINE%",
   "-reuse-instance",
   "-inverse-search",
   "\"F:/VisualCode/Microsoft VS Code/Code.exe\" \"F:/VisualCode/Microsoft VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"",
   "%PDF%"
  ],
  "latex-workshop.view.pdf.external.synctex.command": "C:/Program Files (x86)/Adobe/Acrobat DC/Acrobat/Acrobat.exe",
  "latex-workshop.view.pdf.external.synctex.args": [
   "-forward-search",
   "%TEX%",
   "%LINE%",
   "-reuse-instance",
   "-inverse-search",
   "code \"D:/Program Files/VS Code/resources/app/out/cli.js\" -gr \"%f\":\"%l\"",
   "%PDF%",
  ],
}

在这里插入图片描述
红框部分需要改成自己的PDF编辑器路径,我是用的Adobe公司的Acrobat;
蓝框部分需要改成自己VScode编辑器的路径
原文作者推荐了轻量级的PDF阅读器,在此我也附上链接:
Sumatra PDF

测试

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值