顶部和底部带有蓝色条的 Beamer 模板

顶部和底部带有蓝色条的 Beamer 模板

我怎样才能在投影机中获得这样的东西?

在此处输入图片描述

答案1

一些自定义的标题、框架标题和脚注模板用于添加蓝线:

\documentclass{beamer}

\setbeamercolor{frametitle}{bg=blue,fg=white}
\setbeamercolor{author in head/foot}{bg=blue,fg=white}

\makeatletter
\setbeamertemplate{headline}{%
    \usebeamercolor[bg]{frametitle}\rule{\textwidth}{1cm}
}

\setbeamertemplate{frametitle}{%
    \vskip-1cm%
      \begin{minipage}[c][\headheight][c]{\textwidth}%
        \usebeamerfont{frametitle}%
        \strut\insertframetitle\par
    {%
      \ifx\insertframesubtitle\@empty%
      \else%
      {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\par}%
      \fi
    }%      
      \vspace*{-0.1cm}
      \end{minipage}%
  \vskip-0.1em
}
\setbeamertemplate{footline}{%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=\paperwidth,ht=4.5ex,dp=3.125ex]{author in head/foot}%
    \usebeamerfont{author in head/foot} bar
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

\begin{document}

\begin{frame}[plain]
    \titlepage
\end{frame} 

\begin{frame}
    \frametitle{test}
    abc
\end{frame} 

\begin{frame}
    \frametitle{test}
    \framesubtitle{title}
    abc
\end{frame} 

\begin{frame}
    abc
\end{frame} 

\end{document}

在此处输入图片描述

相关内容