![如何将目录插入到特定的 Beamer 文档中?](https://linux22.com/image/300462/%E5%A6%82%E4%BD%95%E5%B0%86%E7%9B%AE%E5%BD%95%E6%8F%92%E5%85%A5%E5%88%B0%E7%89%B9%E5%AE%9A%E7%9A%84%20Beamer%20%E6%96%87%E6%A1%A3%E4%B8%AD%EF%BC%9F.png)
我想知道如何在我昨天在这里找到的文档中插入目录。这是一个 mwe:
% compile with lualatex or xelatex:
\documentclass[svgnames]{beamer}
\usepackage{booktabs,etoolbox,fontspec,microtype,ragged2e}
\usefonttheme{professionalfonts,serif,structuresmallcapsserif}
\setmainfont[Numbers=OldStyle,SmallCapsFeatures={Kerning=Uppercase}]{Minion Pro}
\linespread{1.0344}
\usecolortheme[named=Maroon]{structure}
\beamertemplatesolidbackgroundcolor{Snow}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[circle]
\apptocmd{\frame}{\justifying}{}{}
\addtobeamertemplate{block begin}{}{\justifying}
\definecolor{alert}{HTML}{347941}
\setbeamercolor{alerted text}{fg=alert}
\begin{document}
\begin{frame}
\frametitle{informative title}
\framesubtitle{optional subtitle}
The studio was filled with the rich odor of roses, and when the
light summer wind stirred amidst the trees of the garden there came
through the open door the heavy scent of the lilac, or the more
delicate perfume of the pink-flowering thorn.
\begin{itemize}
\justifying
\item An item.
\item An \alert{alerted} item.
\end{itemize}
\end{frame}
\end{document}
答案1
% compile with lualatex or xelatex:
\documentclass[svgnames]{beamer}
\usepackage{booktabs,etoolbox,fontspec,microtype,ragged2e}
\usefonttheme{professionalfonts,serif,structuresmallcapsserif}
\setmainfont[Numbers=OldStyle,SmallCapsFeatures={Kerning=Uppercase}]{Minion Pro}
\linespread{1.0344}
\usecolortheme[named=Maroon]{structure}
\beamertemplatesolidbackgroundcolor{Snow}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[circle]
\apptocmd{\frame}{\justifying}{}{}
\addtobeamertemplate{block begin}{}{\justifying}
\definecolor{alert}{HTML}{347941}
\setbeamercolor{alerted text}{fg=alert}
\begin{document}
\begin{frame}
\frametitle{informative title}
\framesubtitle{optional subtitle}
The studio was filled with the rich odor of roses, and when the
light summer wind stirred amidst the trees of the garden there came
through the open door the heavy scent of the lilac, or the more
delicate perfume of the pink-flowering thorn.
\begin{itemize}
\justifying
\item An item.
\item An \alert{alerted} item.
\end{itemize}
\end{frame}
\begin{frame}
\tableofcontents
\end{frame}
\section{test1}
\begin{frame}
test
\end{frame}
\section{test2}
\begin{frame}
test
\end{frame}
\end{document}