? linux ? ? vscode ? ? xelatex ?    发布于 2019-05-09   405人围观   0条评论

pre

  • 安装tex live并配置全局环境变量
  • 安装vscode

禁用fcitx的虚拟键盘

title

fcitx的虚拟键盘会占用编辑快捷键ctrl+alt+b

vscode 安装

安装插件Latex Workshop

title

magic comment

行首加上

  1. % !TEX program = xelatex

指定xelatex编译

这是使用xelatex > bibtex > xelatex > xelatex过程编译。如果不加则默认使用pdflatex。

官方文档中不建议这么做,兼容性成疑,这里使用下面介绍的方式

配置xelatex工具链

打开setting.json,加入

  1. "latex-workshop.latex.tools": [
  2. {
  3. "name": "latexmk",
  4. "command": "latexmk",
  5. "args": [
  6. "-synctex=1",
  7. "-interaction=nonstopmode",
  8. "-file-line-error",
  9. "-pdf",
  10. "%DOC%"
  11. ]
  12. },
  13. {
  14. "name": "xelatex",
  15. "command": "xelatex",
  16. "args": [
  17. "-synctex=1",
  18. "-interaction=nonstopmode",
  19. "-file-line-error",
  20. "%DOC%"
  21. ]
  22. },
  23. {
  24. "name": "pdflatex",
  25. "command": "pdflatex
查看更多