For CJK, follow the instructions below. XeTeX should work also on many other languages with suitable packages and fonts. For the right-to-left languages, however, the latin letters mixed in the right-to-left texts appear in unusual place. To fix the problem, modification of the contents is required in the
*.tex
files of right-to-left languages.
Instructions for CJK
-
Delete the lines of
ucs
andinputenc
(andfontenc
if any) in the preamble of*.tex
to avoid the "MalformedUTF-8sequence" error (see http://tug.org/pipermail/xetex/2011-January/019737.html). -
Add the following lines after "fancy" setting lines in the preamble of
*.tex
(the font settings may vary according to the fonts you have in your computer):\usepackage{fontspec} \usepackage{xeCJK} \setCJKmainfont{Bitstream Cyberbit} \setCJKsansfont{WenQuanYi Micro Hei} \setCJKmonofont{WenQuanYi Micro Hei Mono} \setmainfont{DejaVu Serif} \setsansfont{DejaVu Sans} \setmonofont{Courier 10 Pitch}
Moreover, I replaced\textit
by\textbf
for legibility of CJK texts. -
Run "
xelatex *.tex
" instead ofpdflatex
.