vscode用的久了,感觉确实比texstudio好用。
question 1,vscode-latex中文配置。vscode安装LaTeX Workshop Extension,默认latexmk就已经可以满足写英文paper的要求了。
因为一些原因,现在要写中文的文件,使用的是%!TEX program = xelatex
xelatex编译。
在setting中搜latex的配置文件:
打开settings.json,加上tools和recipes。tools是编译工具, recipes是具体的编译方式,可以直接引用tools。
recipes的第一项为默认编译方式,也就是当执行Build Latex Project时的编译方式,选择其他的编译方式可以执行命令Build with recipe, 然后选择recipes中具体的编译方式。
"latex-workshop.latex.tools": [
{
// 编译工具和命令
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%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": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
],
请使用xe->bib->xe->xe方法编译,只用xelatex发现无法生成bbl文件。顺带改一下pdf预览方法"latex-workshop.view.pdf.viewer": “tab”,默认是在浏览器。
中文文档需要中文字体配置(借大佬图):
附录:
1, 找的之前的码云(github国内托管,比较快)账号了,好久没有用了(学习php+web+java基础):https://gitee.com/hemu
2, 之前写论文,被diss的不轻,深感English真是硬伤,能发出去paper纯属运气+抱住了大腿。大佬说以后看论文别老用整段整段的翻译了,太low……
然后就emmm……,好好学习天天向上。
安装了一个在Ubuntu系统上很好用的屏幕取词翻译软件。windows有有道,Ubuntu系统上推荐stardict,唯一有点麻烦的就是需要自己下载词典进行添加,附带大佬搜集的词库:stardict词库,挺好用。