逆风起笔
c++ and web developer
主页
分类
标签
归档
About Me
友链
My Github
Proudly powered by
Leanote
Theme by ©
mrbird
文章 - vscode + xelatex on ubuntu
Dark
vscode + xelatex on ubuntu
? linux ?
? vscode ?
? xelatex ?
发布于
2019-05-09
434人围观 0条评论
? linux ?
? vscode ?
? xelatex ?
发表于
2019-05-09
434人围观 0条评论
## pre * 安装`tex live`并配置全局环境变量 * 安装`vscode` ## 禁用fcitx的虚拟键盘 ![title](https://leanote.com/api/file/getImage?fileId=5cd240cfab64417a7100556b) fcitx的虚拟键盘会占用编辑快捷键`ctrl+alt+b` ## vscode 安装 安装插件`Latex Workshop` ![title](https://leanote.com/api/file/getImage?fileId=5cd241a7ab64417a71005596) ## magic comment 行首加上 ``` % !TEX program = xelatex ``` 指定`xelatex`编译 这是使用`xelatex > bibtex > xelatex > xelatex`过程编译。如果不加则默认使用pdflatex。 官方文档中不建议这么做,兼容性成疑,这里使用下面介绍的方式 ## 配置xelatex工具链 打开setting.json,加入 ```json "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOC%" ] }, { "name": "xelatex", "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, { "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, { "name": "bibtex", "command": "bibtex", "args": [ "%DOCFILE%" ] } ], "latex-workshop.latex.recipes": [ { "name": "xelatex -> bibtex -> xelatex*2", "tools": [ "xelatex", "bibtex", "xelatex", "xelatex" ] }, { "name": "xelatex", "tools": [ "xelatex" ] }, { "name": "latexmk", "tools": [ "latexmk" ] }, { "name": "pdflatex -> bibtex -> pdflatex*2", "tools": [ "pdflatex", "bibtex", "pdflatex", "pdflatex" ] } ] ``` ## 预览 打开tex文件,右上角有一图标,可以打开预览 ![title](https://leanote.com/api/file/getImage?fileId=5cd38f24ab644131ea0014b4) ## 参考 * [James-Yu/LaTeX-Workshop](https://github.com/James-Yu/LaTeX-Workshop/wiki)
上一篇:
epoll总结
下一篇:
0
赞
提交评论
立即登录
,发表评论
没有帐号?
立即注册
0
条评论
More...
没有帐号?立即注册