# critical package ctex error:ctex fontset“fandol” is unavailable in current

I am trying to use some Chinese characters in my Latex document(But it is not entirely in Chinese) and this is the website that I came across. According to the author, all I need is to use ctex package, but when I copy paste the example code in his website it failed to compile with the error message critical package ctex error:ctex fontset"fandol" is unavailable in current I wonder what went wrong? And if his method is incorrect, I wonder if there is another way that allow me to type Chinese successfuly. (I can not change the documentclass as I am trying to use a poster theme template and the documentclass ,I assume, is predefined.)

MWE:

\documentclass[UTF8]{ctexart}
\usepackage[T1]{fontenc}

\begin{document}

\end{document}


edit: include the error message and picture edit2: uploaded the wrong one. inlcude the correct picture[!

• your example works for me with pdflatex + windows + a current texlive. – Ulrike Fischer May 22 at 14:04
• added the picture. It is not compilable on my Macbook. Do you think it has anything to do with font selection on my local computer? But it also failed to compile on overleaf. – jxhyc May 22 at 14:11
• You are using xelatex, so remove \usepackage[T1]{fontenc}. Beside this: "warning" is a warning/info not an error. Check if the output is okay. – Ulrike Fischer May 22 at 14:23
• Sorry I uploaded the wrong picture. You are right it is compilable using XeLaTex, But when I tried to compile it on LaTex, the compilation was not successful. Would you be kind enough to point out what went wrong? I am not sure my other code, which was written with Latex in mind, can be compiled in XeLaTex without any problem. – jxhyc May 22 at 14:59
• try to set another fontset, see tex.stackexchange.com/a/284933/2388 – Ulrike Fischer May 22 at 15:26

You cannot use pdflatex to compile Chinese documents that specify fandol fonts because
Reference texdoc ctex, sec 4.3中文字库