Latex解決中文內容無法編譯的問題


系統為Ubuntu 17.04 x64

首先安裝TexLive

sudo apt install texlive-full

然后搜索並安裝字體

sudo apt-cache search cjk  

比如,把中文環境安裝上去

apt install latex-cjk-chinese*

然后新建一個test.tex測試環境是否安裝正確

\documentclass{article}
\begin{document}
Hello World!
\end{document}

編譯並執行

pdflatex test.tex
xpdf test.pdf

如果顯示正常則Latex環境安裝正確

然后測試中文配置

\documentclass{article}
\usepackage{CJK}
\begin{CJK}{UTF8}{gbsn}
\begin{document}
中文
\end{CJK}
\end{document}

同樣編譯並執行

pdflatex test.tex
xpdf test.pdf


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM