TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tested a few templates trying to write slides containing Chinese words with TeX Live (from Ubuntu 11.10 repositories). However, it always turned out that some macros were not found despite that the latex-cjk-all package has been installed. So I would like to know whether there are some nice templates for Linux users.

share|improve this question
Related: How does one type Chinese in LaTeX? – Leo Liu Feb 25 '12 at 9:09
Just use beamer with any CJK support above available on your system. Ubuntu has outdated texlive package, you'd better not use it. – Leo Liu Feb 25 '12 at 9:14
@LeoLiu Could you make your comments here into an answer? – Joseph Wright Aug 6 '12 at 8:38
@JosephWright: Done. – Leo Liu Aug 6 '12 at 14:00
@LeoLiu thanks so much for your answers below. – Hongxu Chen Aug 7 '12 at 9:12
up vote 8 down vote accepted

There's nothing new in beamer.

Recommended solution:

% Compile with XeLaTeX, with Chinese fonts installed with Windows as default.

在 beamer 中使用中文。


If you use latest version of ctex package in the SVN trunk, the solution can be also compile with pdfLaTeX. (In fact the solution can be compiled with latex/pdflatex if we don't change \CJKfamilydefault.)

For Linux users, one may have to specify the fonts explictly:

\setCJKsansfont{WenQuanYi Zen Hei}

Solution using raw xeCJK

Everything is similar except that one must specify the Chinese fonts explictly.

% UTF-8 encoding, compile with XeLaTeX
\setCJKsansfont{Microsoft YaHei}

在 beamer 中使用中文在 beamer 中使用中文。


The font Microsoft YaHei can be replaced with any font. For example Linux users may prefer

\setCJKsansfont{WenQuanYi Zen Hei}

or just

\setCJKmainfont{WenQuanYi Zen Hei}

Only XeLaTeX solutions are provided here. These solutions are more mature and easier to use than other solutions using CJK (for pdfLaTeX) or luatex-ja (for LuaLaTeX). Anyway you may refer other sources to use them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.