章节编号、目录后的尾随点

章节编号、目录后的尾随点

目录、章节条目中的章节编号后面有一个尾随点beamer。我该如何去掉它?

以下是 MWE:

\documentclass{beamer}

\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\setbeamertemplate{subsubsection in toc}[subsubsections numbered]

\title{Presentation}
\author{John Doe}
\date{\today}

\begin{document}
\frame{\titlepage}

\part{Introduction}
\frame{\partpage}

\begin{frame}\frametitle{Table of Contents}
  \tableofcontents
\end{frame}

\section{General}
\frame{\sectionpage}

\subsection{Less General}
\frame{\subsectionpage}

\section{Specific}
\frame{\sectionpage}

\subsection{More Specific}
\frame{\subsectionpage}

\end{document}

答案1

您可以section in toc像这样重新定义模板:

\documentclass{beamer}

\makeatletter
\setbeamertemplate{section in toc}{%
  \leavevmode%
  % prevents the period to be printed with the first/last section option
  \ifnum\beamer@tempcount>\beamer@toclastsection
  \else
  \ifnum\beamer@tempcount>0
    \inserttocsectionnumber\space
  \fi\fi%
  \inserttocsection\par%
}
\makeatother

\setbeamertemplate{subsection in toc}[subsections numbered]
\setbeamertemplate{subsubsection in toc}[subsubsections numbered]

\title{Presentation}
\author{John Doe}
\date{\today}

\begin{document}
\frame{\titlepage}

\part{Introduction}
\frame{\partpage}

\begin{frame}\frametitle{Table of Contents}
  \tableofcontents
\end{frame}

\section{General}
\frame{\sectionpage}

\subsection{Less General}
\frame{\subsectionpage}

\section{Specific}
\frame{\sectionpage}

\subsection{More Specific}
\frame{\subsectionpage}

\end{document}

在此处输入图片描述

相关内容