我在标题框上有三个发言者,如下所示:
\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}