从个性化 Montpellier beamer 中的框架脚注中删除标题

从个性化 Montpellier beamer 中的框架脚注中删除标题

我正在准备使用 Montpellier beamer 主题的演示文稿。我尝试个性化标题框以添加页脚。以下代码的问题是标题同时出现在标题栏和页脚中。我希望它只出现在标题栏中。那么请问我该如何从我的个性化 Montpellier beamer 页脚中删除标题并将其仅保留在标题中?

    \documentclass[xcolor={dvipsnames},10pt]{beamer}
%
\useoutertheme{infolines}
\usetheme{Montpellier}
\setbeamertemplate{footline}[infolines]
%
\setbeamercolor{footlinecolor}{fg=black,bg=cyan!40}
\setbeamercolor{title in head/foot}{bg=PineGreen,fg=yellow}
\setbeamercolor{author in head/foot}{parent=footlinecolor}
\setbeamercolor{date in head/foot}{parent=footlinecolor}
\setbeamercolor{separation line}{bg=cyan!40}
%
%
\setbeamercolor*{structure}{bg=PineGreen!20,fg=PineGreen}
\setbeamercolor*{palette primary}{use=structure,fg=yellow,bg=structure.fg!70!gray}
\setbeamercolor*{palette secondary}{use=structure,fg=yellow,bg=structure.fg!65}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor*{palette quaternary}{fg=orange!30!yellow,bg=black}
\setbeamercolor{section in toc}{fg=black,bg=white}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg!50!black!80!black}
\setbeamercolor{titlelike}{parent=palette primary,fg=structure.fg!50!black}
\setbeamercolor{frametitle}{bg=gray!10!white,fg=PineGreen}
\setbeamercolor{title}{fg=yellow,bg=PineGreen}
%
%
\usepackage{tikz}
\addtobeamertemplate{headline}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node at([shift={(5.64,-.53)}]current page.north) {\includegraphics[height=.8\headheight]{logo.png}};
\end{tikzpicture}
}
%
%
\title[the title]{\small\bf the title}
\author[author]{Présented by:\\
author}
%
\institute[]
{
  University
}
%
%
\begin{document}
{
\begin{frame}
\titlepage
\end{frame}
}
%
\end{document}

在此处输入图片描述

答案1

我假设您想从所有框架的脚注中删除文本“标题”,同时仍将脚注的中间部分保持为绿色。在以下 MWE 中,我定义了一个新模板,并通过使用而不是像在参数中那样放置命令footline来更正字体。最后,我还在作者字段中使用了 来摆脱与 - 相关的警告。title\setbeamerfont{title}{size=\small, series=\bfseries}\smalltitle\texorpdfstringhyperref

在此处输入图片描述

\documentclass[xcolor={dvipsnames},10pt]{beamer}
%
\useoutertheme{infolines}
\usetheme{Montpellier}


%
\setbeamercolor{footlinecolor}{fg=black,bg=cyan!40}
\setbeamercolor{title in head/foot}{bg=PineGreen,fg=yellow}
\setbeamercolor{author in head/foot}{parent=footlinecolor}
\setbeamercolor{date in head/foot}{parent=footlinecolor}
\setbeamercolor{separation line}{bg=cyan!40}
%
%
\setbeamercolor*{structure}{bg=PineGreen!20,fg=PineGreen}
\setbeamercolor*{palette primary}{use=structure,fg=yellow,bg=structure.fg!70!gray}
\setbeamercolor*{palette secondary}{use=structure,fg=yellow,bg=structure.fg!65}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor*{palette quaternary}{fg=orange!30!yellow,bg=black}
\setbeamercolor{section in toc}{fg=black,bg=white}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg!50!black!80!black}
\setbeamercolor{titlelike}{parent=palette primary,fg=structure.fg!50!black}
\setbeamercolor{frametitle}{bg=gray!10!white,fg=PineGreen}
\setbeamercolor{title}{fg=yellow,bg=PineGreen}
%
%
\usepackage{tikz}
\addtobeamertemplate{headline}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node at([shift={(5.64,-.53)}]current page.north) {\includegraphics[height=.8\headheight]{example-image.png}};
\end{tikzpicture}
}
%
%
\makeatletter
\defbeamertemplate*{footline}{my theme}
{%
  \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}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \usebeamercolor[fg]{page number in head/foot}\usebeamerfont{page number in head/foot}\usebeamertemplate{page number in head/foot}\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother
\usebeamertemplate{mytheme}

\setbeamerfont{title}{size=\small, series=\bfseries}



\title[the title]{the title}
\author[author]{\texorpdfstring{Présented by:\\
author}{Présented by: author}}
%
\institute[]{University}
%
%
\begin{document}
{
\begin{frame}
\titlepage
\end{frame}
}
%
\end{document}

相关内容