ubuntu18.04-latex-vscode 轻量级配置

  1. 安装下面三个软件包

当然也可以只安装texlive-full,但这个包太大了,有很多用不到的子包。

$ sudo apt install latexmk
$ sudo apt install texlive-xetex
$ sudo apt install texlive-lang-chinese # 需要在国内源下安装
  1. 在vscode中安装插件LaTex Workshop,然后打开用户setting.json,输入
//---------------- latex -----------------
"latex-workshop.latex.tools": [
    {
        "name": "latexmk",
        "command": "latexmk",
        "args": [
            "-xelatex",
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-outdir=%DIR%/.aux",
            "%DOC%"
        ]
    }
],
"latex-workshop.view.pdf.viewer": "browser",
"latex-workshop.latex.outDir": "%DIR%/.aux",
"latex-workshop.latex.autoBuild.run": "never",
"editor.unicodeHighlight.allowedCharacters": {
    ":": true
},

References

posted @ 2022-04-10 19:38  hotfengz  阅读(187)  评论(0)    收藏  举报