Latex beamer显示页码

直接上代码,是基于一个模板找的命令,不知道是否适用于其他模板。

\documentclass[UTF8]{beamer}

\usepackage{ctex}
\usepackage{enumerate}
\usepackage{algorithm,algorithmic}

\mode
{
 % 设置背景
 \setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]

 % 设置block的特征
 \setbeamertemplate{blocks}[rounded][shadow=true]

 % 设置主题
 \usetheme{Warsaw}

 % 设置footline显示页码,但是由于warsaw本身已经定义了一个footline,所以这个定义就会覆盖warsaw的定义。另一方面说明,slides的每一部分都是可以自己定制的。
 % \setbeamertemplate{footline}[frame number]

% 添加页码代码,谷歌找到的。
\expandafter\def\expandafter\insertshorttitle\expandafter{%
	\insertshorttitle\hfill%
	\insertframenumber\,/\,\inserttotalframenumber}


 % 设置覆盖的效果,透明
 \setbeamercovered{transparent}

 \usefonttheme[onlysmall]{structurebold}

 % 设置数学公式的字体
 \usefonttheme[onlymath]{serif}
}

\setlength{\parindent}{2em}

% 设置用acrobat打开就会全屏显示
%\hypersetup{pdfpagemode=FullScreen}

% 设置logo
% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

% \pgfdeclareimage[height=0.5cm]{university-logo}{pku_logo}
% \logo{\pgfuseimage{university-logo}}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Beginning of document
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
% 在每一子章节前有一张胶片显示目录
\AtBeginSection[]
{
 \begin{frame}
   \tableofcontents[currentsection]
 \end{frame}
}


\title[标题]
{\normalsize 子标题 \\ \huge 强调}

\author[XXX]{XXX \\ \small \href{mailto:[email protected]}{[email protected]}}

\institute[XXX, XXX University]
{
 XXX实验室(XXX) \\
 XXX
}

\date[\today]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
    \titlepage
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 目录
\begin{frame}[allowframebreaks]
 \tableofcontents
 % You might wish to add the option [pausesections]
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{引言}

\begin{frame}
	\frametitle{标题}
	
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
 \begin{center}
   \huge Thanks for your attention! \\ Q \& A
 \end{center}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\end{document} 
效果如图

Latex beamer显示页码_第1张图片

Latex beamer显示页码_第2张图片

Latex beamer显示页码_第3张图片

Latex beamer显示页码_第4张图片

Latex beamer显示页码_第5张图片

你可能感兴趣的:(LaTeX)