在特定框架上將演講者的姓名加粗

在特定框架上將演講者的姓名加粗

我的標題框上有三個發言者,如下所示:

\author{Mister X, Mister Y, Mister Z}

我想把名字加粗X先生在第 1 幀和第 2 幀上以及Y先生以第 3 幀和第 4 幀為例。我還沒有找到解決方法;的內容\author無法被覆蓋。

用投影機可以做到嗎?

問候

以下用一段小程式碼來說明:

\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}

相關內容