
Considere este 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}
Posso colocar o ToC em uma página escolhendo shrink
; mas o ToC no início de cada seção não cabe em uma página (uma solução parcial é removê-la hideothersubsections
para que todas as subseções sejam expandidas).
O que eu quero:
No início de cada seção, a seção atual estará no meio da página, todas as suas subseções serão expandidas. Apenas algumas seções vizinhas serão (parcialmente) visíveis, nenhuma das subseções dessas seções será expandida.
Qualquer ajuda será apreciada.
Responder1
O seguinte exibe +- 2 seções ao redor da seção atual. Se você quiser mais ou menos seções, esse número pode ser ajustado.
\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}