![在特定帧上以粗体显示演讲者的名字](https://linux22.com/image/265990/%E5%9C%A8%E7%89%B9%E5%AE%9A%E5%B8%A7%E4%B8%8A%E4%BB%A5%E7%B2%97%E4%BD%93%E6%98%BE%E7%A4%BA%E6%BC%94%E8%AE%B2%E8%80%85%E7%9A%84%E5%90%8D%E5%AD%97.png)
我在标题框上有三个发言者,如下所示:
\author{Mister X, Mister Y, Mister Z}
我想加粗名称X先生在第 1 帧和第 2 帧上Y先生例如在第 3 帧和第 4 帧。我还没有找到解决方案;的内容\author
无法被覆盖。
使用 beamer 可以做到这一点吗?
问候
这里有一段小代码来说明:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Warsaw}
\usecolortheme{crane}
\usepackage[french]{babel}
\title{My Talk}
\subtitle{All authors must be here}
\author{Mister X, Mister Y, Mister Z}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{Mister X's part}
\frame{
\frametitle{Part of Mister X}
"Mister X" must be bold in the footer.
}
\section{Mister Y's part}
\frame{
\frametitle{Part of MisterY}
"Mister Y" must be bold in the footer.
}
\end{document}
答案1
\value{framenumber}
您可以通过和 修改 的可选参数来测试框架的数量\author
。条件\ifcase
测试值的数量并使用给定的定义。注意\ifcase
从 0 开始。
\author[%
\ifcase\value{framenumber}
\or%1
Mister X, Mister Y, Mister Z
\or%2
\textbf{Mister X}, Mister Y, Mister Z
\or%3
Mister X, \textbf{Mister Y}, Mister Z
\else%4,5,...
Mister X, Mister Y, Mister Z
\fi%
]{Mister X, Mister Y, Mister Z}
这里是你的例子:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Warsaw}
\usecolortheme{crane}
\usepackage[french]{babel}
\title{My Talk}
\subtitle{All authors must be here}
\author[%
\ifcase\value{framenumber}
\or%1
Mister X, Mister Y, Mister Z
\or%2
\textbf{Mister X}, Mister Y, Mister Z
\or%3
Mister X, \textbf{Mister Y}, Mister Z
\else%4,5,...
Mister X, Mister Y, Mister Z
\fi%
]{Mister X, Mister Y, Mister Z}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{Mister X's part}
\frame{
\frametitle{Part of Mister X}
"Mister X" must be bold in the footer.
}
\section{Mister Y's part}
\frame{
\frametitle{Part of MisterY}
"Mister Y" must be bold in the footer.
}
\end{document}