Unterabschnitte eines Abschnitts erscheinen nicht im Inhaltsverzeichnis (LaTeX-Beamer-Modus)

Unterabschnitte eines Abschnitts erscheinen nicht im Inhaltsverzeichnis (LaTeX-Beamer-Modus)

Ich versuche, eine Präsentation im Beamer-Modus von LaTeX vorzubereiten. Aus irgendeinem Grund werden die Unterabschnitte meines letzten Abschnitts nicht im Inhaltsverzeichnis angezeigt.

Hier ist mein MWE (inkl. aller Pakete, die ich verwende):

\documentclass[a4paper,11pt,fleqn,compress]{beamer}
\usepackage[english,ngerman]{babel} % language listed last is default setting
\usepackage[utf8x]{inputenc}

\usepackage{amsmath, amsthm, amssymb, amsbsy}
\usepackage{nccmath} % includes {fleqn} environment
\usepackage{bbm} % includes \mathbbm{} symbols 

\usepackage{braket} % Bra-Ket notation in quantum mechanics 

\usepackage{helvet} % font set to "helvetica"

\usepackage[normalem]{ulem}
\usepackage{microtype} 

\parindent=0mm % indent to indicate new paragraph prohibited

\makeatletter
\@addtoreset{section}{chapter}
\makeatother % section count set to 0 when new chapter begins

\usepackage{listliketab}
\usepackage{tabto}
\usepackage{isotope} 
\usepackage{extarrows}

\usepackage{graphicx}
\usepackage{grffile} % changes the algorithm to check for known file extensions instead of using the first dot "." to find the file extension as conducted by "graphicx" and also "graphcis"

\DeclareMathSizes{12}{9}{7}{5}

\usepackage{caption}
\usepackage{subfigure} 

\let\origitem\item
\renewcommand{\item}{\normalfont\origitem}
\newcommand{\bolditem}{\normalfont\bfseries\origitem}

\newcommand{\eqqcolon}{\mathrel{=\!\!\mathop:}}
\newcommand{\coloneqq}{\mathrel{\mathop:\!\!=}}

\usepackage{pdfpages} 


% following content recommended for LaTeX beamer mode

\title{\textbf{Title}}
\subtitle{Subtitle}
\author{Author} 
\institute{Institute}
\date{\scriptsize{Date}}


\setbeamertemplate{navigation symbols}{} % default navigation symbols hidden
\usetheme{Berlin}

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

\setbeamertemplate{section in head/foot}    {\hfill\insertsectionheadnumber.~\insertsectionhead}
\setbeamertemplate{section in head/foot shaded}{\color{structure!50}\hfill\insertsectionheadnumber.~\insertsectionhead}
\setbeamertemplate{section in toc}{\inserttocsectionnumber.~\inserttocsection}

\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\small \tableofcontents[currentsection,hideothersubsections]
\end{frame}
} % display table of contents with current section higlighted automatically


\begin{document}

{ % to delimit a block (changes apply for this block only)
\makeatletter % to change template
\setbeamertemplate{headline}[default]
\def\beamer@entrycode{\vspace*{-\headheight}}
\setbeamertemplate{footline}[default]
\def\beamer@entrycode{\vspace*{-\footheight}}
\makeatother
\frame{\titlepage} 
}

{ % to delimit a block (changes apply for this block only)
\makeatletter % to change template
\setbeamertemplate{headline}[default]
\def\beamer@entrycode{\vspace*{-\headheight}}
\makeatother
\begin{frame}
\frametitle{Table of Contents} \small \tableofcontents
\end{frame}
}


\section{Section 1}

\subsection{Subsection 1.1}

\subsection{Subsection 1.2}

\subsection{Subsection 1.3}

\subsection{Subsection 1.4}


\section{Section 2}

\subsection{Subsection 2.1}

\subsection{Subsection 2.2}


\section{Section 3}

\subsection{Subsection 3.1}

\subsection{Subsection 3.2}

\subsection{Subsection 3.3}

\subsection{Subsection 3.4}


\section{Section 4}


\section{Section 5}

\subsection{Subsection 5.1}

\subsection{Subsection 5.2}

\end{document}

Ich kann meinen Fehler nicht finden. Vielen Dank für Ihre Hilfe.

Antwort1

Damit Abschnitte im Inhaltsverzeichnis angezeigt werden, müssen sie der .tocDatei hinzugefügt werden. Dazu muss nach dem entsprechenden Abschnittsbefehl anscheinend etwas gesetzt werden. Denn es \sectionist so eingerichtet, dasssetzeneine Version des Inhaltsverzeichnisses, \sectionfügt den Abschnitt immer zum Inhaltsverzeichnis hinzu. Im Fall von \subsectionist dies jedoch nicht der Fall. Damit diese hinzugefügt werden, muss nach dem entsprechenden Befehl explizit etwas hinzugefügt werden. Wie Torbjørn T. anmerkt, könnte dies ein Rahmen mit Inhalt sein. Es könnte aber auch ein anderer \sectionBefehl sein:

\documentclass[a4paper,11pt,fleqn,compress]{beamer}

% following content recommended for LaTeX beamer mode

\title{\textbf{Title}}
\subtitle{Subtitle}
\author{Author}
\institute{Institute}
\date{\scriptsize{Date}}


\setbeamertemplate{navigation symbols}{} % default navigation symbols hidden
\usetheme{Berlin}

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

\setbeamertemplate{section in head/foot}    {\hfill\insertsectionheadnumber.~\insertsectionhead}
\setbeamertemplate{section in head/foot shaded}{\color{structure!50}\hfill\insertsectionheadnumber.~\insertsectionhead}
\setbeamertemplate{section in toc}{\inserttocsectionnumber.~\inserttocsection}

\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\small \tableofcontents[currentsection,hideothersubsections]
\end{frame}
} % display table of contents with current section higlighted automatically


\begin{document}

\frame[plain]{\titlepage}

{ % to delimit a block (changes apply for this block only)
\makeatletter % to change template
\setbeamertemplate{headline}[default]
\def\beamer@entrycode{\vspace*{-\headheight}}
\makeatother
\begin{frame}
\frametitle{Table of Contents} \small \tableofcontents
\end{frame}
}

\section{Section 1}

\subsection{Subsection 1.1}

\subsection{Subsection 1.2}

\subsection{Subsection 1.3}

\subsection{Subsection 1.4}


\section{Section 2}

\subsection{Subsection 2.1}

\subsection{Subsection 2.2}


\section{Section 3}

\subsection{Subsection 3.1}

\subsection{Subsection 3.2}

\subsection{Subsection 3.3}

\subsection{Subsection 3.4}


\section{Section 4}


\section{Section 5}

\subsection{Subsection 5.1}

\subsection{Subsection 5.2}

\section{Section 6}

\end{document}

Inhaltsverzeichnis

verwandte Informationen