or
bonanza
beamer
I am looking for some more options how to modify the appearing of subsection text in the ToC and the triggers created by \AtBeginSection.

More specifically, I would like to have modifictions of \subsection command to achieve the following:


\documentclass{beamer}

\AtBeginSection[]{
\begin{frame}[noframenumbering]{Outline}{}
\tableofcontents[currentsection]
\end{frame}
}

\def\f{
\begin{frame}
blala
\end{frame}
}

\begin{document}
\section{section}
\subsection{triggers both: ToC frame and entry in toc}
\f
\modsubsection{no ToC frame trigger, but entry in toc}
\f
\othermodsubsection{ToC frame trigger, but no entry in toc}
\f
\subsection*{neither toc frame, nor entry in toc}
\f
\end{document}


How to create such functions \modsubsection and \othermodsubsection?
Top Answer
samcarter
beamer defines its \subsection command in beamerbasesection.sty. One can use this definition as model to define your own commands:


\documentclass{beamer}

\setbeamertemplate{subsection page}{
\begin{frame}[noframenumbering]
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}

\makeatletter
\renewcommand<>{\subsection}{\AtBeginSubsection[]{\subsectionpage}\alt#1{\@ifnextchar[\beamer@subsection\beamer@@subsection}{\beamer@secgobble}}
\newcommand<>{\modsubsection}{\AtBeginSubsection[]{}\alt#1{\@ifnextchar[\beamer@subsection\beamer@@subsection}{\beamer@secgobble}}
\newcommand<>{\othermodsubsection}{\AtBeginSubsection[\subsectionpage]{}\alt#1{\@ifnextchar[\beamer@subsection\beamer@@subsection}{\beamer@secgobble}}
\makeatother

\begin{document}

\section{section}

\subsection{triggers both: ToC frame and entry in toc}
\begin{frame}
\insertsubsectionhead
\end{frame}

\modsubsection{no ToC frame trigger, but entry in toc}
\begin{frame}
\insertsubsectionhead
\end{frame}

\othermodsubsection*{ToC frame trigger, but no entry in toc}
\begin{frame}
\insertsubsectionhead
\end{frame}

\subsection*{neither toc frame, nor entry in toc}
\begin{frame}
\insertsubsectionhead
\end{frame}

\end{document}


![document.gif](/image?hash=157c965c9a1f0ef42f5d86cac9a62f6507e19e72fa15a426a77fba6bd396a342)
Beamer show subsection in ToC but do not trigger \AtBeginSection

This is a dedicated room for discussion about this question.

Once logged in you can direct comments to the question poster (or any answer poster) here.