跟进“Beamer – 如何使用编号目录来获得子部分缩进?”,有没有办法缩进目录中的项目,以便所选的内部主题也适用于目录?
以下示例成功修改了目录项的缩进,但未能将所选主题应用于编号(请参阅环境enumerate
以进行比较):
\documentclass{beamer}
\useinnertheme{circles}
\begin{document}
\setbeamertemplate{section in toc}{\leavevmode\leftskip=3.2em\rlap{\hskip-2em\inserttocsectionnumber}\inserttocsection\par}
\begin{frame}
\tableofcontents
\end{frame}
\section{One}
\section{Two}
\section{Three}
\begin{frame}
Chosen Few
\begin{enumerate}
\item One
\item Two
\item Three
\end{enumerate}
\end{frame}
\end{document}
答案1
你可以\defbeamertemplate{section in toc}{circle}
从\defbeamertemplate{subsection in toc}{circle}
beamerbaseauxtemplates.sty
作为起点并根据需要更改 leftskip:
\documentclass{beamer}
\useinnertheme{circles}
\makeatletter
\setbeamertemplate{section in toc}
{\leavevmode\leftskip=4ex% Change value here, origionally 2ex
\llap{%
\usebeamerfont*{section number projected}%
\usebeamercolor{section number projected}%
\begin{pgfpicture}{-1ex}{0ex}{1ex}{2ex}
\color{bg}
\pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex}
\pgfusepath{fill}
\pgftext[base]{\color{fg}\inserttocsectionnumber}
\end{pgfpicture}\kern1.25ex%
}%
\inserttocsection\par}
\setbeamertemplate{subsection in toc}
{\leavevmode\leftskip=2em\inserttocsubsection\par}
\makeatother
\begin{document}
\begin{frame}
\tableofcontents
\end{frame}
\section{One}
\section{Two}
\section{Three}
\begin{frame}
Chosen Few
\begin{enumerate}
\item One
\item Two
\item Three
\end{enumerate}
\end{frame}
\end{document}