matze/mtheme

how to use Chinese in this theme?

dc-wangjn opened this issue · 2 comments

how to use Chinese in this theme?

Approach 1: Just add a package named xeCJK. An example is given below:

% !TeX program = xelatex
\documentclass{beamer}
\usepackage{xeCJK}
\usetheme[background=light]{metropolis}

\title{MWE Beamer Chinese Fonts}
\subtitle{}
\date{\today}
\author{Author Name 作者名字}
\institute{Institute Name 组织名字}

\begin{document}
\maketitle
\begin{frame}{Table of contents 目录}
  \setbeamertemplate{section in toc}[sections numbered]
  \tableofcontents[hideallsubsections]
\end{frame}
\section{Section title 章节名}
\begin{frame}{Frame title 幻灯片名}
    \begin{itemize}
        \item Item one 普通字体 \bf{粗体} \it{斜体} \texttt{mono 字体}
    \end{itemize}
\end{frame}
\end{document}

Approach 2: Use documentclass ctexbeamer. An example is given below:

% !TeX program = xelatex
\documentclass[UTF8]{ctexbeamer}
\usetheme[background=light]{metropolis}

\title{MWE Beamer Chinese Fonts}
\subtitle{}
\date{\today}
\author{Author Name 作者名字}
\institute{Institute Name 组织名字}

\begin{document}
\maketitle
\begin{frame}{Table of contents 目录}
  \setbeamertemplate{section in toc}[sections numbered]
  \tableofcontents[hideallsubsections]
\end{frame}
\section{Section title 章节名}
\begin{frame}{Frame title 幻灯片名}
    \begin{itemize}
        \item Item one 普通字体 \bf{粗体} \it{斜体} \texttt{mono 字体}
    \end{itemize}
\end{frame}
\end{document}

Approach 1: Just add a package named xeCJK. An example is given below:

% !TeX program = xelatex
\documentclass{beamer}
\usepackage{xeCJK}
\usetheme[background=light]{metropolis}

\title{MWE Beamer Chinese Fonts}
\subtitle{}
\date{\today}
\author{Author Name 作者名字}
\institute{Institute Name 组织名字}

\begin{document}
\maketitle
\begin{frame}{Table of contents 目录}
  \setbeamertemplate{section in toc}[sections numbered]
  \tableofcontents[hideallsubsections]
\end{frame}
\section{Section title 章节名}
\begin{frame}{Frame title 幻灯片名}
    \begin{itemize}
        \item Item one 普通字体 \bf{粗体} \it{斜体} \texttt{mono 字体}
    \end{itemize}
\end{frame}
\end{document}

Approach 2: Use documentclass ctexbeamer. An example is given below:

% !TeX program = xelatex
\documentclass[UTF8]{ctexbeamer}
\usetheme[background=light]{metropolis}

\title{MWE Beamer Chinese Fonts}
\subtitle{}
\date{\today}
\author{Author Name 作者名字}
\institute{Institute Name 组织名字}

\begin{document}
\maketitle
\begin{frame}{Table of contents 目录}
  \setbeamertemplate{section in toc}[sections numbered]
  \tableofcontents[hideallsubsections]
\end{frame}
\section{Section title 章节名}
\begin{frame}{Frame title 幻灯片名}
    \begin{itemize}
        \item Item one 普通字体 \bf{粗体} \it{斜体} \texttt{mono 字体}
    \end{itemize}
\end{frame}
\end{document}

thanks for your sharing and best wishes to you