![将字幕添加到侧边栏投影仪](https://linux22.com/image/349158/%E5%B0%86%E5%AD%97%E5%B9%95%E6%B7%BB%E5%8A%A0%E5%88%B0%E4%BE%A7%E8%BE%B9%E6%A0%8F%E6%8A%95%E5%BD%B1%E4%BB%AA.png)
在 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}