![如何在投影仪类中垂直移动侧边栏内容?](https://linux22.com/image/398450/%E5%A6%82%E4%BD%95%E5%9C%A8%E6%8A%95%E5%BD%B1%E4%BB%AA%E7%B1%BB%E4%B8%AD%E5%9E%82%E7%9B%B4%E7%A7%BB%E5%8A%A8%E4%BE%A7%E8%BE%B9%E6%A0%8F%E5%86%85%E5%AE%B9%EF%BC%9F.png)
答案1
在下面的例子中,我已将部分内容复制beamerouterthemesidebar.sty
到 MWE,并对可以修改的行添加了注释,以便更改侧边栏中元素之间的垂直间距。
\documentclass{beamer}
\usetheme{Berkeley}
\makeatletter
\setbeamertemplate{sidebar \beamer@sidebarside}
{
\beamer@tempdim=\beamer@sidebarwidth%
\advance\beamer@tempdim by -6pt%
{\usebeamerfont{title in sidebar}%
\vskip1.5em% <--- Vertical space before title in the sidebar.
\hskip3pt%
\usebeamercolor[fg]{title in sidebar}%
\insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
\vskip1.25em% <--- Vertical space between author and title in sidebar.
}%
{%
\hskip3pt%
\usebeamercolor[fg]{author in sidebar}%
\usebeamerfont{author in sidebar}%
\insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
\vskip1.25em% <--- Vertical space between author and first section heading.
}%
\insertverticalnavigation{\beamer@sidebarwidth}%
\vfill
\ifx\beamer@sidebarside\beamer@lefttext%
\else%
\usebeamercolor{normal text}%
\llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
\vskip2pt%
\fi%
}%
\makeatother
\title{This is the title}
\author{the author}
\begin{document}
\section{Some text}
\begin{frame}
\end{frame}
\end{document}