
我正在寫一個相當長的投影儀,有很多部分。包含各個部分的目錄適合一張投影片,但是當我在每個部分顯示小節時,它會變得太長,我們看不到它。我希望在節/小節的每個開頭僅顯示該節的目錄,並在頂部對齊。
目前,當到達第 4 部分時,我得到,其中 === 代表滑動限制:
============
1. Section1
2. Section2
3. Section3
4. Section4
4.1 Subsection 41
===================
4.2 Subsection 42 (so it gets out of the slide)
5. Section5
我希望有:
==========
4. Section4 (aligned at the top of the slide !)
4.1 Subsection 41
4.2 Subsection 42
(free space here)
========
即使我使用sectionstyle=show/hide, subsectionstyle=show/shaded/hide
,該部分的位置也會被「記住」。
謝謝!
答案1
若要僅顯示目前部分的目錄,您可以使用
\documentclass{beamer}
\AtBeginSection{%
\begin{frame}
\tableofcontents[sections=\value{section}]
\end{frame}
}
\begin{document}
\section{sec1}
\subsection{sub1}
\frame{abc}
\section{sec2}
\subsection{sub2}
\frame{abc}
\end{document}