[Tex/LaTex] Chinese typing on mac

cjktexshop

I want to type Chinese with latex. I have new installed mac OS system (English). I use texshop as IDE. And now I keep getting simsun or simhei not found error. I guess these fonts are windows fonts. Could anyone summarize how to prepare the Chinese fonts on a English mac system?

\documentclass[UTF8]{ctexart}
\begin{document}
文章内容。
\end{document}

Error log:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
/usr/local/texlive/2014/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.d
ef:5: fontspec error: "font-not-found"
! 
! The font "SimHei" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.5   {SimSun}

Best Answer

ctex bundle use Chinese fonts for Windows by default. You can use the fonts installed in Mac.

% !TEX program = XeLaTeX
% !TEX encoding = UTF-8
\documentclass[UTF8,nofonts]{ctexart}
\setCJKmainfont[BoldFont=STHeiti,ItalicFont=STKaiti]{STSong}
\setCJKsansfont[BoldFont=STHeiti]{STXihei}
\setCJKmonofont{STFangsong}

\begin{document}
文章内容。
\end{document}

There is nothing much to summerize, just change the fonts following the xeCJK manual. On Mac OS X, STSong and other SinoType fonts are preinstlled.

Alternatively, you can also use free Fandol fonts for Chinese documents, which are preinstlled in latest TeX Live (MacTeX).

% !TEX program = XeLaTeX
% !TEX encoding = UTF-8
\documentclass[UTF8,nofonts]{ctexart}
\setCJKmainfont[BoldFont=FandolSong-Bold.otf,ItalicFont=FandolKai-Regular.otf]{FandolSong-Regular.otf}
\setCJKsansfont[BoldFont=FandolHei-Bold.otf]{FandolHei-Regular.otf}
\setCJKmonofont{FandolFang-Regular.otf}

\begin{document}
文章内容。
\end{document}

We plan to release a new version of ctex bundle later this year, which provides more font sets for those Mac OS X and Linux users.