如何列出 Beamer TOC 的所有部分而不进行部分分离?

如何列出 Beamer TOC 的所有部分而不进行部分分离?

我想在主目录中列出所有部分,不分部分。我没有找到相关主题,类似的主题如何收集 Beamer 中的所有零件? 主要代码目录仅与\part{}图 1 中的第一个有关,而想要的输出 - 所有部分没有部分分离

\documentclass{beamer}
\usetheme{Berkeley} 
\logo{\includegraphics[width=1cm]{example-image}}
% https://tex.stackexchange.com/a/346486/13173
\newenvironment{slide}[1]
{\begin{frame}[environment=slide,allowframebreaks]
\frametitle{\insertsection-#1}
}
{\end{frame}}
% fragile only if code
% allowframebreaks not by default 

\begin{document} 
\title{Sensory system. Primary sensory modalities. Cortical modalities. Kinds of sensory disturbances. Spinal cord disorders. Spinal cord transverse and partial lesion. Cauda equina damage.}
\author{Leo}

% TODO Print TOC of all parts here

\begin{frame}{Contents}
\tableofcontents
\end{frame}

% https://tex.stackexchange.com/a/115891/13173
\AtBeginSection[]{\begin{frame}{Outline}
\tableofcontents[hideothersubsections, pausesections]
\end{frame}}

\AtBeginSection[]{\begin{frame}{Outline}
\tableofcontents[hideothersubsections]
\end{frame}}

% not complete answer here https://tex.stackexchange.com/q/353064/13173

\section{Cortical modalities 1}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities 2}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities 3}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\part{}
\begin{frame}{Contents}
\tableofcontents
\end{frame}

\section{Cortical modalities 4}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities 5}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\end{document}

图 1 输出

在此处输入图片描述

预期输出:列表形式显示第 1-5 节的目录,不按部分分开

  • 不是第 1 部分 abc,而是第 2 部分 de
  • 通缉:abcde

操作系统:Debian 8.7
TeXLive:2016

答案1

正如之前对您的问题的回答中所说,不要\usepackage{hyperref}在投影仪文档中使用。

循环遍历不同的部分:

\documentclass{beamer}

\usepackage{pgffor}

\usepackage{totcount}
\regtotcounter{part}

\begin{document} 

\begin{frame}
\tableofcontents
\foreach\x in {1,...,\totvalue{part}}{%
    \vskip-0.4cm
    \tableofcontents[part=\x]%
}%
\end{frame}


\section{Cortical modalities 1}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 2}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 3}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\part{}
\section{Cortical modalities 4}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 5}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\part{}
\section{Cortical modalities 6}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 7}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\end{document}

(该值\vskip-0.4cm是通过眼睛猜测的,可能需要进行一些微调)

相关内容