安装Latex
sudo apt install texlive texlive-lang-chinese
写一个测试文档
\documentclass[fontset=ubuntu,UTF8,a4paper, 11pt]{ctexart}
\begin{document}
你好 \LaTeX!
\end{document}
这里[fontset=ubuntu,UTF8,a4paper, 11pt]
是必须的,否则会出一下错误:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Critical ctex error: "fontset-unavailable"
!
! CTeX fontset `fandol' is unavailable in current mode.
!
! See the ctex documentation for further information.
!
! For immediate help type H <return>.
!...............................................
编译
pdflatex test.tex