我在 Beamer 中使用 Szeged 主题。我想修改页脚,使其在我的简称和研究所的简称旁边,在页脚右侧包含帧编号和帧总数。我尝试使用以下代码,但页脚仅包含我的名字和研究所的简称;另一个不良影响是页脚区域的颜色发生了变化。
有没有什么办法可以实现这个目标?
\documentclass[12pt, dvips, dvipsnames]{beamer}
%NOTES:
\setbeameroption{show notes}
%\setbeameroption{hide notes}
%PACKAGES
\usepackage[english]{babel}
%THEMES
\usetheme{Szeged}
\useinnertheme{default}
\usefonttheme{serif}
\usecolortheme{dolphin}
%TEMPLATE
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{note page}[compress]
\setbeamertemplate{itemize items}[default]
\setbeamertemplate{enumerate items}[default]
%TOC
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\setbeamerfont{subsection in toc}{size=\small, shape=\itshape}
%FOOTER:
\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[width=0.333\paperwidth, ht=2.5ex, dp=1ex, center]{author in head/foot}%
\usebeamerfont{authour in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[width=0.333\paperwidth, ht=2.5ex, dp=1ex, center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[width=0.333\paperwidth, ht=2.5ex, dp=1ex, center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertframenumber/\inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\begin{document}
\section{Section 1}
\begin{frame}\frametitle{My Frametitle}
A frame!
\end{frame}
\end{document}
答案1
塞格德主题基本上不过是
\useoutertheme[footline=institutetitle]{miniframes}
\setbeamercolor{separation line}{use=structure,bg=structure.fg!50!bg}
miniframes
外部主题的脚注和您的 ansatz(似乎来自外部主题)的混合版本infolines
可能看起来像
\setbeamertemplate{footline}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
\end{beamercolorbox}
\hbox{%
\begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=0.333333\paperwidth, ht=2.5ex, dp=1.125ex, center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertframenumber/\inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
\end{beamercolorbox}
}
这可能正是您正在寻找的。