command line tools有什么用_用VSCode配置Latex

7940a07c7088647f14d60d98fadab4f4.png

之前用VScode配置了Latex(原来的配置均从网络汇总),但是换了一台电脑,重新从网上找的配置不太满意,所以把原来的copy过来了,感觉还是原来的顺手呀。就当给自己存个档,顺便留给大家,有需要自取。

  1. 安装texlive
  2. 安装vscode
  3. 在vscode中安装latex workshop 插件
  4. 在vscode-setting.json中复制如下代码

完成!


另外可能存在一些些问题,譬如评论区有位小伙伴

”build的时候显示Recipe terminated with fatal error: spawn xelatex ENOENT.怎么办“

大概这也是我没想过的问题,我搜了一下,可能的解决方案是

把安装路径加入到系统环境变量path里重启,我的就是 D:texlive2020binwin32

以及如果点了半天Recipe:xelatex或者Recipe:pdflatex等没反应,一定要检查自己的latex框架写对了没有

documentclass[UTF8]{ctexart}
begin{document}

begin{equation}
    a^2+b^2=c^2
end{equation}

end{document}

"latex-workshop.latex.tools": [
    {
 "name": "xelatex",
 "command": "xelatex",
 "args": [
 "-synctex=1",
 "-interaction=nonstopmode",
 "-file-line-error",
 "%DOCFILE%"
        ]
    },
    {
 "name": "latexmk",
 "command": "latexmk",
 "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": "latexmk",
 "tools": [
 "latexmk"
        ]
    },
    {
 "name": "pdflatex -> bibtex -> pdflatex*2",
 "tools": [
 "pdflatex",
 "bibtex",
 "pdflatex",
 "pdflatex"
        ]
    }
],
"latex-workshop.latex.clean.enabled": false,
"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",
"*.gz"
],
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.autoClean.run": "onBuilt"
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值