在Ubuntu下使用latex

发表于 2017-12-17   |   分类于 默认分类   |   访问: 1,486 次
  1. 安装Latex

     sudo apt install texlive texlive-lang-chinese
  2. 写一个测试文档

     \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>.
     !...............................................  
  3. 编译

     pdflatex test.tex

发表新评论

© 2019 Powered by Typecho & Theme Quark
粤ICP备17055048号