set beamer footline

 avatar
user_1829680
latex
a month ago
1.2 kB
1
Indexable
Never
\documentclass{beamer}
\usepackage{ctex}

% theme
\usetheme{Berlin}
\usecolortheme{dolphin}
\definecolor{blueA}{HTML}{3588be}
\definecolor{blueB}{HTML}{0269ae}
\setbeamercolor*{palette secondary}{bg=blueA, fg = white}
\setbeamercolor*{palette tertiary}{bg=blueB, fg = white}


% config
\setbeamertemplate{footline}{%
  \leavevmode%
  \vbox{\hbox{%
  \begin{beamercolorbox}[wd=1\paperwidth,ht=2.25ex,dp=1ex,left]{author in head/foot}%
    \usebeamerfont{author in head/foot}
    \insertshortauthor
  \end{beamercolorbox}}%
  \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{title in head/foot}%
    \usebeamerfont{title in head/foot}%
    \hspace*{1ex}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{title in head/foot}%
    \usebeamerfont{title in head/foot}%
    第 \insertframenumber{}页/共\inserttotalframenumber 页\hspace*{2ex}
  \end{beamercolorbox}}}%
  \vskip0pt%
}

\title{Test}
\author{Eureka}
\date{\today}
\begin{document}

\section{sec}
\subsection{subsec}
\begin{frame}
  Hello world
\end{frame} 

\end{document}
Leave a Comment