仅设置自定义标题页 \usebeamerfont{author,institute} 部分的颜色

仅设置自定义标题页 \usebeamerfont{author,institute} 部分的颜色

对于以下 Beamer 代码,我只想将作者和机构部分的颜色更改为黑色。其他部分保留为蓝色。我该如何实现?

谢谢R

\documentclass{beamer}
\defbeamertemplate*{title page}{customized}[1][]
{
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\bigskip
\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par
\bigskip
 \usebeamerfont{author}\insertauthor\par
\bigskip
\usebeamerfont{institute}{\tiny \insertinstitute}\par
\bigskip
\usebeamerfont{date}\insertdate\par
\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic
}

\centering

\title{Blah Blah Blah}
\subtitle{Blah Blah Blah Blah}
\author{Someone}
\institute[University of]{

\inst{1}%
 Department of Stuff\\
 University of Someplace
 \and
\inst{2}%
 Department of Stuff\\
 University of Somplace~\\
}
\date{\today}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\maketitle
\end{document}

答案1

这是一个解决方案投影机。 这最簡單beamer 的解决方案是在命令前简单地改变字体颜色\insertauthor,然后在命令前将其改回\insertdate

使用\usebeamercolor[black]{}更改为黑色,然后\usebeamercolor[fg]{title}将颜色改回(与标题相同的颜色)。

\documentclass{beamer}
\defbeamertemplate*{title page}{customized}[1][]
{
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\bigskip
\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par
\bigskip
 \usebeamerfont{author}\usebeamercolor[black]{}\insertauthor\par
\bigskip
\usebeamerfont{institute}{\tiny \insertinstitute}\par
\bigskip
\usebeamerfont{date}\usebeamercolor[fg]{title}\insertdate\par
\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic
}

\centering

\title{Blah Blah Blah}
\subtitle{Blah Blah Blah Blah}
\author{Someone}
\institute[University of]{

\inst{1}%
 Department of Stuff\\
 University of Someplace
 \and
\inst{2}%
 Department of Stuff\\
 University of Somplace~\\
}
\date{\today}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\maketitle
\end{document}

结果

答案2

一个不是投影机解决方案:插入\textcolor{black}{...}\author声明\institute。虽然此解决方案可能也会影响页眉或页脚中作者的颜色。

\documentclass{beamer}
\defbeamertemplate*{title page}{customized}[1][]
{
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\bigskip
\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par
\bigskip
 \usebeamerfont{author}\insertauthor\par
\bigskip
\usebeamerfont{institute}{\tiny \insertinstitute}\par
\bigskip
\usebeamerfont{date}\insertdate\par
\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic
}

\centering

\title{Blah Blah Blah}
\subtitle{Blah Blah Blah Blah}
\author{\textcolor{black}{Someone}}
\institute[University of]{
\textcolor{black}{
\inst{1}%
 Department of Stuff\\
 University of Someplace
 \and
\inst{2}%
 Department of Stuff\\
 University of Somplace~\\}
}
\date{\today}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\maketitle
\end{document}

在此处输入图片描述

第二版:à la beamer

另一个版本与Grimler 的提议略有不同。这个版本建议author使用institute

\setbeamercolor{author}{fg=black}
\setbeamercolor{institute}{fg=black}

并在你的声明中使用它们title page

\usebeamerfont{author}{\usebeamercolor[fg]{author}\insertauthor}\par
\usebeamerfont{institute}{\usebeamercolor[fg]{institute}\tiny \insertinstitute}\par

使用default标题页声明,只需修复作者和机构颜色就足够了,因为它用于\beamercolorboxes插入它们,但您的customized版本没有这样做。

相关内容