将字幕添加到侧边栏投影仪

将字幕添加到侧边栏投影仪

在 Beamer 的侧边栏主题中,如何用副标题替换作者?我发现侧边栏的 .sty 文件,另一篇文章描述了从侧边栏中删除作者(和标题),我知道可以使用插入副标题\insertsubtitle,但我不知道如何将这两种见解结合起来。

平均能量损失

\documentclass{beamer}
\useoutertheme{sidebar}
\title{Supply and Demand}
\subtitle{Econ 101}
\author{Dr. Economist}
\institute{College of Dreams}
\date{\today}

\begin{document}

\begin{frame}{Frame title}
\begin{itemize}
    \item This is some text.
    \item Some more text. 
\end{itemize}
\end{frame}

\end{document}

答案1

\documentclass{beamer}

\useoutertheme{sidebar}
\let\insertshortauthor\insertshortsubtitle

\title{Supply and Demand}
\subtitle{Econ 101}
\author{Dr. Economist}
\institute{College of Dreams}
\date{\today}

\begin{document}

\begin{frame}{Frame title}
  \begin{itemize}
  \item This is some text.
  \item Some more text. 
  \end{itemize}
\end{frame}

\end{document}

答案2

\documentclass{beamer}
\useoutertheme{sidebar}
\title{Supply and Demand}
\subtitle{Econ 101}
\author{Dr. Economist}
\institute{College of Dreams}
\date{}

\makeatletter
\setbeamertemplate{sidebar left}
{
  \beamer@tempdim=\beamer@sidebarwidth%
  \advance\beamer@tempdim by -6pt%
  {\usebeamerfont{title in sidebar}%
    \vskip1.5em%
    \hskip3pt%
    \usebeamercolor[fg]{title in sidebar}%
    \insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
    \vskip1.25em%
  }%
  {%
    \hskip3pt%
    \usebeamercolor[fg]{author in sidebar}%
    \usebeamerfont{author in sidebar}%
%    \insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
    \insertshortsubtitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
    \vskip1.25em%
  }%
  \insertverticalnavigation{\beamer@sidebarwidth}%
  \vfill
  \ifx\beamer@sidebarside\beamer@lefttext%
  \else%
    \usebeamercolor{normal text}%
    \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
    \vskip2pt%
  \fi%
}%
\makeatother

\begin{document}

\begin{frame}{Frame title}
\begin{itemize}
    \item This is some text.
    \item Some more text. 
\end{itemize}
\end{frame}

\end{document}

在此处输入图片描述

相关内容