您的位置:首页 > 运维架构

Visual Studio Code & LaTeX Workshop 优雅地编写Latex文档 , 完美支持中文

2017-11-03 22:22 1331 查看
LATEX 是基于 Tex 的排版系统,多用于排版高质量的科技类和数学类文档。

Tex Live

TexLive是tex的集合环境,包含了pdfletex,xeletex等编译器。

下载地址:http://ctan.mirrors.hoobly.com/systems/texlive/Images/texlive2017-20170524.iso

安装过程:https://zhuanlan.zhihu.com/p/19779481?columnSlug=LaTeX

Visual Studio Code

Visual Studio Code,一款强大的跨平台编辑器。

Latex Workshop

Latex Wordshop 是 Visual Studio Code 下的一个扩展,可编译、反定向、有代码提示。

安装好Tex Live 和 vscode 之后,直接在扩展里面搜索Latex Workshop并安装。

Latex Workshop默认是用pdflatex编译的,我们将他改成Xelatex后即可完美支持中文。

修改方法如下:

ctrl+,

搜索latex-workshop.latex.toolchain->右键 Replace in Setting->修改为如下代码

"latex-workshop.latex.toolchain": [
{
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
}, {
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}, {
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
}, {
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
}
]


这样就配置结束了,ctrl+alt+b编译,ctrl+alt+t查看。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: