[1]Ubuntu 使用 Latex,使用VS Code 中文
https://zhuanlan.zhihu.com/p/65931654[2]使用VSCode编写LaTeX
https://zhuanlan.zhihu.com/p/38178015[3]Demo测试:一个简单的LaTex例子
https://blog.csdn.net/qq_16587307/article/details/92829098
1. 安装Latex环境[1]
1.1 安装latex
sudo apt-get install texlive-latex-base
1.2 安装中文环境
sudo apt-get install latex-cjk-all
1.3 安装额外包
sudo apt-get install texlive-latex-extra
1.4 安装图形界面texmaker
sudo apt-get install texmaker
1.5 安装xelatex
sudo apt-get install texlive-xetex
1.6 安装publisher
sudo apt-get install texlive-publishers
2. 安装vscode
sudo dpkg -i <vs code名字>.deb
3. 安装插件Latex Workshop
打开VS code,在插件栏搜索 latex workshop,点击 install
4. 配置插件,使它支持中文
打开设置,搜索 latex-workshop.latex.recipes
点击 Edit in settings.json
将 settings.json 内的代码替换为下列行[2]:
{
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
],
},
{
"name": "pdflatex",
"tools": [
"pdflatex"
]
},
{
"name": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "pdf->bib->pdf->pdf",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
"latex-workshop.latex.tools": [
{
// 编译工具和命令
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.view.pdf.viewer": "tab",
}
3. Demo测试[3]
图示代码来自:一个简单的LaTex例子
网友评论