1. 安装latex
Tex Live是Letex发行版之一,使用apt包管理器安装,需消耗一定时间。
sudo apt install texlive-full
2. 安装XeLaTeX编译引擎
sudo apt install texlive-xetex
3. 安装xeCJK中文支持包
xeCJK是中文处理技术其中之一。
sudo apt install texlive-lang-chinese
4. 图形化界面安装与设置
(1)图形化界面有TeXworks,TeXmaker和TeXstudio等。笔者采用TeXstudio。
sudo apt install texstudio
(2)在TeXstudio软件中,需要设置编译器XeLaTeX。
Options->Configure TeXstudio->Build->Default Compiler中更改为XeLaTeX。
(3)设置TeXstudio为中文界面
Options->Configure TeXstudio->General->Language更改为zh-CN
5. 测试
(1)新建文件,快捷键“Ctrl + n”
(2)在文件在写入测试语句。
\documentclass{article}
\usepackage{xeCJK}
\begin{document}
hello,你好
\end{document}
(3)F5编译运行 或 点击上方绿色三角形。