打开 /usr/share/texmf/tex/latex/beamer/beamer.cls 或 /usr/share/texmf/tex/latex/beamer/base/beamer.cls 找到
\DeclareOptionBeamer{CJK}{\ExecuteOptionsBeamer{cjk}} \DeclareOptionBeamer{cjk}{ \def\beamer@hypercjk{\hypersetup{CJKbookmarks=true}} \def\beamer@activecjk{ % Activate all >128 characters. \count@=127 \@whilenum\count@<255 \do{% \advance\count@ by 1 \lccode`\~=\count@ \catcode\count@=\active \lowercase{\def~{\kern1ex}} } } }
在beamer3.06中是在178行,把% Activate all >128 characters.改成% Activate all >=0x80 characters. 然后在上文的第三个} 后加上下面几句:
\DeclareOptionBeamer{CJKutf8}{\ExecuteOptionsBeamer{cjkutf8}} \DeclareOptionBeamer{cjkutf8}{% \PassOptionsToPackage{unicode}{hyperref} \def\beamer@activecjk{ % Activate all characters >= 0x80. \count@=127 \@whilenum\count@<254 \do{% \advance\count@ by 1 \lccode`\~=\count@ \catcode\count@=\active \lowercase{\def~{\kern1ex}} } } }
之后用\documentclass[CJKutf8]{beamer}调用beamer类,并用\usepackage{CJKutf8}来使用CJKutf8宏包,之后按常规使用中文环境,最后用pdflatex编译 .tex文档两次即可。