Install texlive

Download it at tsinghua, choose the texlive.iso*

Install perl-tk, for texlive installation

1
$ sudo apt install perl-tk

Load the texlive ISO file (do not care the warning)

1
2
3
4
5
$ sudo mount -o loop yourtexlive.iso /mnt
$ cd /mnt
# launch the GUI, just click install it
$ sudo ./install-tl -gui

Adding another packages

1
2
3
4
5
# adding chinese support
$ sudo apt install texlive-lang-chinese

# adding some package and fonts support
$ sudo apt install texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-fonts-recommended

Installing XeLatex

1
$ sudo apt install texlive-xetex

Using chinse in Latex

  • CTeX
1
2
3
4
5
6
\documentclass[UTF8]{ctexart}
\usepackage[T1]{fontenc}

\begin{document}
你好,这是一个测试文档。
\end{document}

when using ctexart documention, recommand add it\usepackage[T1]{fontenc}, in case symbol can’t be displayed correct

  • ctex
1
2
3
4
5
\documentclass{article}
\usepackage[UTF8]{ctex}
\begin{document}
你好,这是一个测试文档。
\end{document}

Reference

vimtex
全面总结如何在 LaTeX 中使用中文 (2020 最新版)