如何自定义 Ilmenau beamer 页脚以打印帧号

如何自定义 Ilmenau beamer 页脚以打印帧号

我已经在 Google 上搜索了这个问题好几个小时,却没有找到任何能满足我需要的好东西......

我喜欢Ilmenau红色的主题beaver,但我不知道如何管理它的设置......

基本上,我对这段代码有几个问题:

\documentclass{beamer}
\usetheme{Ilmenau}
\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{pslatex}
\usecolortheme{beaver}

\title{My title}
\subtitle{My subtitle}
\institute{Fantastic school}
\date{\today}

\AtBeginSection[]
{
  \begin{frame}
    \frametitle{Table of Contents}
    \small \tableofcontents[currentsection, hideothersubsections]
  \end{frame}
}
\setcounter{framenumber}{0}

\begin{document}

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

\begin{frame}
\frametitle{Table of Contents}
\tableofcontents 
\end{frame}

\section{First sections}

\subsection{Test one}

\begin{frame}
\frametitle{My nice frametitle}
This is a text in first frame. This is a text in first frame. This is a text in first frame 
\end{frame}

\subsection{Test two}

\begin{frame}
\frametitle{My second nice frametitle}
This is a text in second frame. This is a text in second frame. This is a text in second frame 
\end{frame}

\end{document}

我的问题是:

  1. 如何将每帧显示的“我的梦幻学校”的颜色从白色变为黑色?(嗯,实际上它不可读,我们只是看不到它!)
  2. 如何在“我的标题”的最右侧放置一些帧编号?我假设我必须将其放置\insertframenumber/\inserttotalframenumber在某个位置,但是...具体放在哪里?
  3. 如何将那些滑稽的蓝色圆形“1”、“2”改得更\tableofcontents可爱一些?

非常感谢您的帮助...干杯!

答案1

  1. 您需要安装institute in head/foot颜色;例如:

    \setbeamercolor{institute in head/foot}{fg=black}
    
  2. 您需要重新定义footline所使用的模板Ilmenau;我标记了使用进行更改的行%<- here

  3. 您有几种可能的修改方式(都是基本的),允许sections/subsections in toc您更改目录中章节和子章节的外观。请参阅beamer手册第 100 页以查看可用选项。

    例如,要隐藏标记(球内的数字),你可以说

    \setbeamertemplate{sections/subsections in toc}[default]
    

    如果要进行重大自定义,则必须重新定义模板section in tocsubsection in toc。在下面的示例中,我使用了一个非常基本的设计,使用长破折号表示部分,使用短破折号表示子部分:

    \defbeamertemplate*{section in toc}{mysections in toc}
    {\leavevmode ---\,\inserttocsection\par}
    
    \defbeamertemplate*{subsection in toc}{mysections in toc}
    {\leavevmode\leftskip=2.5em --\,\inserttocsubsection\par}
    

    但你可以把它们设置得尽可能可爱。

代码包含注释:

\documentclass{beamer}
\usetheme{Ilmenau}
\usepackage[utf8]{inputenc}

\usecolortheme{beaver}

%change color fot the institute
\setbeamercolor{institute in head/foot}{fg=black}
\makeatletter
%change the footline template to include frame numbers
\defbeamertemplate*{footline}{myminiframes theme}
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
      \hfill%
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle\hfill \insertframenumber/\inserttotalframenumber}%<-here
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\makeatother

%change look of sections in ToC
\defbeamertemplate*{section in toc}{mysections in toc}
{\leavevmode ---\,\inserttocsection\par}

%change look of subsections in ToC
\defbeamertemplate*{subsection in toc}{mysections in toc}
{\leavevmode\leftskip=2.5em --\,\inserttocsubsection\par}

\title{My title}
\subtitle{My subtitle}
\institute{Fantastic school}
\date{\today}

\AtBeginSection[]
{
  \begin{frame}
    \frametitle{Table of Contents}
    \small \tableofcontents[currentsection, hideothersubsections]
  \end{frame}
}
\setcounter{framenumber}{0}

\begin{document}

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

\begin{frame}
\frametitle{Table of Contents}
\tableofcontents 
\end{frame}

\section{First sections}

\subsection{Test one}

\begin{frame}
\frametitle{My nice frametitle}
This is a text in first frame. This is a text in first frame. This is a text in first frame 
\end{frame}

\subsection{Test two}

\begin{frame}
\frametitle{My second nice frametitle}
This is a text in second frame. This is a text in second frame. This is a text in second frame 
\end{frame}

\end{document}

在此处输入图片描述

相关内容