VisualStudioCode(VSCode)对于tex文件的自动编译
(2024-03-21 09:57:33)分类: LaTex |
在Visual Studio
Code(VSCode)中编辑LaTex文档,每次保存都会自动编译。结果就是如果代码有问题,会直接报错提醒,如果代码没问题,会被编译两次。由于在编辑过程中保存只是一个习惯行为,不希望每次改动都编译,因此希望把这个功能禁止掉。
结局方法是,在“settings.json”中,增加以下语句:
"latex-workshop.latex.autoBuild.run": "never"
根据文档资料,“latex-workshop.latex.autoBuild.run”参数共有三个可选值:never,onSave或者onFileChange,其中最后一个是默认值,也就是每次改动都会自动编译。
参考:
https://tex.stackexchange.com/questions/689674/is-it-possible-to-disable-the-auto-compile-when-using-latex-workshop-plugin-in-v/
https://tex.stackexchange.com/questions/632376/how-to-prevent-the-latex-workshop-extension-from-compiling-when-i-save-a-file