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

本文介绍如何使用TexLive和VisualStudioCode配置支持中文的Latex环境。通过安装LatexWorkshop扩展并设置Xelatex作为编译器,实现Latex文档的中文排版。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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查看。

转载于:https://www.cnblogs.com/Chizhao/p/10439739.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值