Mac上TexStudio無法顯示中文字符的問題
MacTex+TexStudio配置,完成之后發現內置的pdf閱讀器中無法顯示中文字符,下面是解決方法:
可以像編譯英文一樣編譯中文:導言區引入下面宏包
\usepackage[fontset=mac]{ctex}
注:上面黃色背景標注的內容,是處理mac環境下顯示中文字體的關鍵,添加后即可正常顯示中文字符
示例
1 \documentclass{article} 2 \usepackage[fontset=mac]{ctex} 3 \begin{document} % plus the \end{document} command at the end. 4 歡迎訪問@tsingke 博客, 下面是對比展示的demo 5 6 \section{章節標題一} % This command makes a section title. 7 8 Hello world ! 9 10 Hello world ! 11 12 Hello world ! 13 \section{章節標題二} % This command makes a section title. 14 15 我是第一行中文字體 16 17 我是第二行中文字體 18 19 我是第三行中文字體 20 21 \end{document}
編譯結果: