[Tex/LaTex] Are there any good Chinese beamer templates available for Linux TeX Live users

beamercjk

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.

Best Answer

There's nothing new in beamer.

Recommended solution:

% Compile with XeLaTeX, with Chinese fonts installed with Windows as default.
\documentclass{beamer}
\usepackage[noindent,UTF8]{ctexcap}
\renewcommand\CJKfamilydefault{\CJKsfdefault}
\begin{document}

\begin{frame}{中文}
在 beamer 中使用中文。
\end{frame}

\end{document}

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:

\usepackage[nofonts,noindent,UTF8]{ctexcap}
\renewcommand\CJKfamilydefault{\CJKsfdefault}
\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
\documentclass{beamer}
\usepackage{xeCJK}
\renewcommand\CJKfamilydefault{\CJKsfdefault}
\setCJKsansfont{Microsoft YaHei}
\begin{document}

\begin{frame}{中文}
在 beamer 中使用中文在 beamer 中使用中文。
\end{frame}

\end{document}

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

\renewcommand\CJKfamilydefault{\CJKsfdefault}
\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.