![向 Beamer 模板添加元素](https://linux22.com/image/461461/%E5%90%91%20Beamer%20%E6%A8%A1%E6%9D%BF%E6%B7%BB%E5%8A%A0%E5%85%83%E7%B4%A0.png)
我想将包含简短作者/标题/页码的脚注(如 Boadilla 主题中一样)添加到新加坡主题中(基本上,我希望新加坡加上脚注)。我只想在演示文稿中使用它(而不是创建新模板)。我尝试查看文档和网络,但找不到简单的方法。有什么建议吗?谢谢。
答案1
主题Boadilla
使用外部主题的脚注infolines
。您可以将定义复制到演示文稿中并根据需要更改颜色:
\documentclass{beamer}
\author{names}
\title{text}
\usetheme{Singapore}
\makeatletter
\setbeamertemplate{footline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,leftskip=2ex,rightskip=2ex,sep=0pt]{date in head/foot}%
\hfill%
\usebeamerfont{date in head/foot}%
\insertshortdate{}%
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\usebeamertemplate{page number in head/foot}%
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\setbeamercolor{author in head/foot}{use=structure,fg=black,bg=structure.fg!40!white}
\setbeamercolor{title in head/foot}{use=structure,fg=white,bg=structure.fg!60!white}
\setbeamercolor{date in head/foot}{use=structure,fg=white,bg=structure.fg!90!white}
\begin{document}
\begin{frame}
\frametitle{title}
abc
\end{frame}
\end{document}