
Betrachten Sie dieses MWE:
\documentclass{beamer}
\AtBeginSection[]{%
\begin{frame}<beamer>
\frametitle{Outline}
\begin{minipage}{.25\textwidth}
\tableofcontents[currentsection, hideothersubsections] % removing hideothersubsections solves the problem
\end{minipage}
\hfill
\begin{minipage}{.55\textwidth}
\begin{centering}
\insertsectionhead
\end{centering}
\end{minipage}
\end{frame}
}
\begin{document}
\begin{frame}[shrink]{ToC}
\tableofcontents
\end{frame}
\section[aa]{AA}
\begin{frame}{A}
a
\end{frame}
\section[bb]{BB}
\begin{frame}{B}
b
\end{frame}
\section{CC}
\begin{frame}{C}
c
\end{frame}
\section{DD}
\begin{frame}{D}
d
\end{frame}
\section[ee]{EE}
\begin{frame}{E}
e
\end{frame}
\section[ff]{FF}
\begin{frame}{F}
f
\end{frame}
\section[gg]{GG}
\begin{frame}{G}
g
\end{frame}
\section[hh]{HH}
\begin{frame}{H}
h
\end{frame}
\section[ii]{II}
\subsection[iii]{III}
\subsection[iv]{IV}
\subsection[v]{V}
\begin{frame}{I}
i
\end{frame}
\end{document}
Ich kann das Inhaltsverzeichnis auf eine Seite unterbringen, indem ich wähle shrink
; aber das Inhaltsverzeichnis am Anfang jedes Abschnitts passt nicht auf eine Seite (eine Teillösung besteht darin, es zu entfernen, hideothersubsections
sodass alle Unterabschnitte erweitert werden).
Was ich möchte:
Zu Beginn jedes Abschnitts wird der aktuelle Abschnitt in der Mitte der Seite angezeigt, alle seine Unterabschnitte werden erweitert. Nur einige benachbarte Abschnitte werden (teilweise) sichtbar sein, keine der Unterabschnitte dieser Abschnitte werden erweitert.
Jede Hilfe wird geschätzt.
Antwort1
Im Folgenden werden +- 2 Abschnitte um den aktuellen Abschnitt herum angezeigt. Wenn Sie mehr oder weniger Abschnitte wünschen, kann diese Zahl angepasst werden.
\documentclass{beamer}
\newcounter{start}
\newcounter{stop}
\AtBeginSection[]{%
\setcounter{start}{\thesection}
\setcounter{stop}{\thesection}
\ifnum\value{section}>1
\ifnum\value{section}=2
\addtocounter{start}{-1}%
\else%
\addtocounter{start}{-2}%
\fi%
\fi%
\addtocounter{stop}{2}
\begin{frame}<beamer>
\frametitle{Outline}
\begin{columns}[c]
\begin{column}{.25\textwidth}
\tableofcontents[sections=\thestart-\thestop, subsectionstyle=show/show/hide] % removing hideothersubsections solves the problem
\end{column}
\hfill
\begin{column}{.55\textwidth}
\begin{centering}
\insertsectionhead
\end{centering}
\end{column}
\end{columns}
\end{frame}
}
\begin{document}
\begin{frame}[shrink]{ToC}
\tableofcontents
\end{frame}
\section[aa]{AA}
\begin{frame}{A}
a
\end{frame}
\section[bb]{BB}
\begin{frame}{B}
b
\end{frame}
\section{CC}
\begin{frame}{C}
c
\end{frame}
\section{DD}
\begin{frame}{D}
d
\end{frame}
\section[ee]{EE}
\begin{frame}{E}
e
\end{frame}
\section[ff]{FF}
\begin{frame}{F}
f
\end{frame}
\section[gg]{GG}
\begin{frame}{G}
g
\end{frame}
\section[hh]{HH}
\begin{frame}{H}
h
\end{frame}
\section[ii]{II}
\subsection[iii]{III}
\subsection[iv]{IV}
\subsection[v]{V}
\begin{frame}{I}
i
\end{frame}
\end{document}