ustcSlides
ustcSlides copied to clipboard
Develop
trafficstars
use ctex package instead of CJKutf8 package to handle Chinese character. So it no need to use \zh{} or \zhb{} to wrap the Chinese character.
Dear Zhihua.
I finally got around to look into ctex.
In my tests, I got it to work under xelatex and lualatex. Under the pdflatex and plain latex I got into some issues, e.g., some font problems, and sometimes the documents would not compile for other reasons. So I changed my package to
- check if we are compiling under
xelatexorlualatex - if so, check if the
ctexpackage is available - if both is true, i.e., we have
ctexand are either underxelatexorlualatex, usectexand\let\zhto\relaxand\zhbto\mbox, i.e., render the commands harmless (\zhbdoes still the line break protection, as it is supposed to) - otherwise, if
CJKutf8is available, use it and define\zhand\zhbas before - otherwise,
\let\zhto\relaxand\zhbto\mboxand hope for the best
This way, I can compile my example documents under all four compilers. The problems that were reported in the past should then no longer occur under xelatex and lualatex.