
我正在使用帶有更寬側邊欄的 Beamer Berkeley 主題。我想將標題頁和章節頁面中的資訊水平居中。
為了實現這一點,我對框架使用了普通選項。然而,儘管側邊欄本身由於普通模式而被隱藏,但標題等和部分名稱的位置似乎是相對於側邊欄的。我怎樣才能滿足要求?謝謝。
MWE 如下:
\documentclass{beamer}
\usetheme[width=2cm]{Berkeley}
\AtBeginSection[]{
\begin{frame}[plain]
\vfill
\centering
\begin{beamercolorbox}
[sep=8pt,center,shadow=true,rounded=true]{title}
\usebeamerfont{title}\thesection. \insertsectionhead\par%
\end{beamercolorbox}
\vfill
\end{frame}
}
\title{Title Title Title Title Title Title Title Title Title}
\author{Author Author Author}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}
\begin{frame}{Frame 1}
Frame 1
\end{frame}
\section{Section Section Section Section Section}
\begin{frame}{Frame 2}
Frame 2
\end{frame}
\begin{frame}{Frame 3}
Frame 3
\end{frame}
\end{document}
答案1
您可以將標題和部分頁面向左移動側邊欄寬度的一半:
\documentclass{beamer}
\usetheme[width=2cm]{Berkeley}
\AtBeginSection[]{
{
\hoffset=-.5\beamersidebarwidth
\begin{frame}[plain]
\vfill
\centering
\begin{beamercolorbox}
[sep=8pt,center,shadow=true,rounded=true]{title}
\usebeamerfont{title}\thesection. \insertsectionhead\par%
\end{beamercolorbox}
\vfill
\end{frame}
}
}
\title{Title Title Title Title Title Title Title Title Title}
\author{Author Author Author}
\begin{document}
{
\hoffset=-.5\beamersidebarwidth
\begin{frame}[plain]
\maketitle
\end{frame}
}
\begin{frame}{Frame 1}
Frame 1
\end{frame}
\section{Section Section Section Section Section}
\begin{frame}{Frame 2}
Frame 2
\end{frame}
\begin{frame}{Frame 3}
Frame 3
\end{frame}
\end{document}
如果您想在標題和部分頁面上有更多空間,可以將標題向左移動側邊欄的整個寬度並增加文字寬度:
\documentclass{beamer}
\usetheme[width=2cm]{Berkeley}
\AtBeginSection[]{
{
\hoffset=-\beamersidebarwidth
\advance\textwidth\beamersidebarwidth
\hsize\textwidth
\columnwidth\textwidth
\begin{frame}[plain]
\vfill
\centering
\begin{beamercolorbox}
[sep=8pt,center,shadow=true,rounded=true]{title}
\usebeamerfont{title}\thesection. \insertsectionhead\par%
\end{beamercolorbox}
\vfill
\end{frame}
}
}
\title{Title Title Title Title Title Title Title Title Title}
\author{Author Author Author}
\begin{document}
{
\hoffset=-\beamersidebarwidth
\advance\textwidth\beamersidebarwidth
\hsize\textwidth
\columnwidth\textwidth
\begin{frame}[plain]
\maketitle
\end{frame}
}
\begin{frame}{Frame 1}
Frame 1
\end{frame}
\section{Section Section Section Section Section}
\begin{frame}{Frame 2}
Frame 2
\end{frame}
\begin{frame}{Frame 3}
Frame 3
\end{frame}
\end{document}