Latex幻灯片ppt的beamer中,如何在每章节前自动显示当前所处目录位置
看了其他文章,是手动在每章前设置帧。本文提供一段代码,使得自动在每章节前显示当前所处目录位置。
如果只需要在新的一节(Section)前显示当前所处大纲位置,则在导言区添加如下代码:
\AtBeginSection[]{
\begin{frame}
\tableofcontents[currentsection]
\end{frame}
} % 每到新的一节(Section)显示大纲
如果需要在新的一节(Section)和小节(SubSection)前显示当前所处大纲位置,则在导言区添加如下代码
\AtBeginSubsection[]{
\begin{frame}{目录}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
} % 每到新的一节(Section)或一小节(SubSection)显示大纲
本代码来自本科课程,感谢老师