我想知道如何在我昨天在这里找到的文档中插入目录。这是一个 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}