![仅设置自定义标题页 \usebeamerfont{author,institute} 部分的颜色](https://linux22.com/image/312649/%E4%BB%85%E8%AE%BE%E7%BD%AE%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A0%87%E9%A2%98%E9%A1%B5%20%5Cusebeamerfont%7Bauthor%2Cinstitute%7D%20%E9%83%A8%E5%88%86%E7%9A%84%E9%A2%9C%E8%89%B2.png)
对于以下 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
版本没有这样做。