Beamer加中文

documentclass{beamer}

mode<presentation>
{
  usetheme{CambridgeUS}      % or try Darmstadt, Madrid, Warsaw, ...
%  usecolortheme{default} % or try albatross, beaver, crane, ...
%  usefonttheme{default}  % or try serif, structurebold, ...
  setbeamertemplate{navigation symbols}{}
  setbeamertemplate{caption}[numbered]
} 


usepackage{graphicx} % Allows including images
usepackage{booktabs} % Allows the use of 	oprule, midrule and ottomrule in tables
usepackage{fontspec}  
setsansfont{Hiragino Sans GB} % font name is case-sensitive  

	itle[你好]{你好啊} % The short title appears at the bottom of every slide, the full title is only on the title page

author{黄世宇} % Your name
institute[THU] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{
清华大学计算机科学与技术系 \ % Your institution for the title page
medskip
	extit{huangsy13@gmail.com} % Your email address
}
date{	oday} % Date, can be changed to a custom date

egin{document}

egin{frame}
	itlepage % Print the title page as the first slide
end{frame}

egin{frame}
frametitle{Overview} % Table of contents slide, comment this block out to remove it
	ableofcontents % Throughout your presentation, if you choose to use section{} and subsection{} commands, these will automatically be printed on this slide as an overview of your presentation
end{frame}

%----------------------------------------------------------------------------------------
%    PRESENTATION SLIDES
%----------------------------------------------------------------------------------------

%------------------------------------------------
section{背景介绍} % Sections can be created in order to organize your presentation into discrete blocks, all sections and subsections are automatically printed in the table of contents as an overview of the talk
%------------------------------------------------

subsection{主要应用} % A subsection can be created just before a set of slides with a common theme to further break down your presentation into chunks

egin{frame}
frametitle{Paragraphs of Text}
Sed iaculis dapibus gravida. Morbi sed tortor erat, nec interdum arcu. Sed id lorem lectus. Quisque viverra augue id sem ornare non aliquam nibh tristique. Aenean in ligula nisl. Nulla sed tellus ipsum. Donec vestibulum ligula non lorem vulputate fermentum accumsan neque mollis.\~\

Sed diam enim, sagittis nec condimentum sit amet, ullamcorper sit amet libero. Aliquam vel dui orci, a porta odio. Nullam id suscipit ipsum. Aenean lobortis commodo sem, ut commodo leo gravida vitae. Pellentesque vehicula ante iaculis arcu pretium rutrum eget sit amet purus. Integer ornare nulla quis neque ultrices lobortis. Vestibulum ultrices tincidunt libero, quis commodo erat ullamcorper id.
end{frame}

%------------------------------------------------

egin{frame}
frametitle{Bullet Points}
egin{itemize}
item Lorem ipsum dolor sit amet, consectetur adipiscing elit
item Aliquam blandit faucibus nisi, sit amet dapibus enim tempus eu
item Nulla commodo, erat quis gravida posuere, elit lacus lobortis est, quis porttitor odio mauris at libero
item Nam cursus est eget velit posuere pellentesque
item Vestibulum faucibus velit a augue condimentum quis convallis nulla gravida
end{itemize}
end{frame}

%------------------------------------------------

egin{frame}
frametitle{Blocks of Highlighted Text}
egin{block}{Block 1}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor.
end{block}

egin{block}{Block 2}
Pellentesque sed tellus purus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum quis magna at risus dictum tempor eu vitae velit.
end{block}

egin{block}{Block 3}
Suspendisse tincidunt sagittis gravida. Curabitur condimentum, enim sed venenatis rutrum, ipsum neque consectetur orci, sed blandit justo nisi ac lacus.
end{block}
end{frame}

%------------------------------------------------

egin{frame}
frametitle{Multiple Columns}
egin{columns}[c] % The "c" option specifies centered vertical alignment while the "t" option is used for top vertical alignment

column{.45	extwidth} % Left column and width
	extbf{Heading}
egin{enumerate}
item Statement
item Explanation
item Example
end{enumerate}

column{.5	extwidth} % Right column and width
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor.

end{columns}
end{frame}

%------------------------------------------------
section{Second Section}
%------------------------------------------------

egin{frame}
frametitle{Table}
egin{table}
egin{tabular}{l l l}
	oprule
	extbf{Treatments} & 	extbf{Response 1} & 	extbf{Response 2}\
midrule
Treatment 1 & 0.0003262 & 0.562 \
Treatment 2 & 0.0015681 & 0.910 \
Treatment 3 & 0.0009271 & 0.296 \
ottomrule
end{tabular}
caption{Table caption}
end{table}
end{frame}

%------------------------------------------------

egin{frame}
frametitle{Theorem}
egin{theorem}[Mass energy equivalence]
$E = mc^2$
end{theorem}
end{frame}

%------------------------------------------------

egin{frame}[fragile] % Need to use the fragile option when verbatim is used in the slide
frametitle{Verbatim}
egin{example}[Theorem Slide Code]
egin{verbatim}
egin{frame}
frametitle{Theorem}
egin{theorem}[Mass--energy equivalence]
$E = mc^2$
end{theorem}
end{frame}end{verbatim}
end{example}
end{frame}

%------------------------------------------------

egin{frame}
frametitle{Figure}
Uncomment the code on this slide to include your own image from the same directory as the template .TeX file.
%egin{figure}
%includegraphics[width=0.8linewidth]{test}
%end{figure}
end{frame}

%------------------------------------------------

egin{frame}[fragile] % Need to use the fragile option when verbatim is used in the slide
frametitle{Citation}
An example of the verb|cite| command to cite within the presentation:\~

This statement requires citation cite{p1}.
end{frame}

%------------------------------------------------

egin{frame}
frametitle{References}
footnotesize{
egin{thebibliography}{99} % Beamer does not support BibTeX so references must be inserted manually as below
ibitem[Smith, 2012]{p1} John Smith (2012)

ewblock Title of the publication

ewblock emph{Journal Name} 12(3), 45 -- 678.
end{thebibliography}
}
end{frame}

%------------------------------------------------

egin{frame}
Huge{centerline{The End}}
end{frame}

%----------------------------------------------------------------------------------------

end{document} 
原文地址:https://www.cnblogs.com/huangshiyu13/p/6246448.html